Python syntax highlighting doesn't handle line extension (\)

Aperta
#9,015 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
57/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
tooling

Direzione di ricerca

The report shows a Python code block where a backslash continues a string across lines, but it does not name the highlighting file or test. Start by locating the Python syntax highlighting implementation and its tests, then reproduce the supplied example. Done means world" is highlighted as part of the string and following text is treated as code.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug text upstream
Description

Python syntax highlighting doesn't handle string with "\" line extension correctly.

Repro:

```py
"Hello\
world"
```
Image

world" should be highlighted green. Also, any text after world" should be treated as code, but it is treated as the beginning of a new string.

Operating system

Windows, Web app

Typst version
  • I am using the latest version of Typst
Lingua principale
Rust
Stelle
57.2k
Fork
1.8k
Merge medio
1g 17h
PR unite (30g)
22

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di typst/typst

Tutte le issue di typst/typst

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.