Quarto visual mode / source mode switching breaks equation block formatting and syntax highlighting
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- typescript
- Ambito
- tooling
Direzione di ricerca
Start by reproducing the visual/source mode switch in a Quarto .qmd document using the multi-line equation and {#eq-label} examples from the report. Trace the visual/source mode entry point that reformats equation blocks, then verify that the closing $$ and label remain together, cross-references resolve, and following R code blocks retain their gray background.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Bug description
👋hello! This issue was originally posted at https://github.com/posit-dev/positron/issues/14763#issue-4838651653, and is reposted here at the request of @juliasilge .
When switching between visual mode and source mode in a Quarto .qmd document, the editor reformats multi-line equation blocks
$$
equation
$$
into single-line form
$$equation$$
, which causes two related bugs:
Bug 1 — Cross-reference label malformation
After a visual→source mode switch, a properly formatted numbered equation like:
$$
y_i = \alpha + \sum_{j=1}^{p} \beta_j x_{ij} + \varepsilon_i
$$ {#eq-liner-model}
is reformatted into:
$$\text{equation}$$
{#eq-a-error-format}
The label {#eq-a-error-format} is placed on a new line with a leading space, making it unrecognizable to the Quarto cross-reference engine. Rendering the document produces:
Unable to resolve crossref @eq-a-error-format
Bug 2 — Lost syntax highlighting (gray background)
A correctly formatted single-line numbered equation:
$$(\hat{\alpha}, \hat{\boldsymbol{\beta}}) = \arg\min \left\{ \sum_{i=1}^{N} \left(y_i - \alpha - \sum_{j=1}^{p} \beta_j x_{ij}\right)^2 \right\} \quad \text{subject to} \quad \sum_{j=1}^{p} |\beta_j| \leq t$$ {#eq-lasso}
renders correctly and cross-references work, but the equation block itself is not wrapped in the usual gray background box. Moreover, any R code blocks that follow this equation also lose their gray background.
Expected behavior:
Switching between visual and source mode should preserve the original multi-line equation block structure.
The {#eq-label} syntax should remain on the same line as the closing $$.
All code blocks should consistently display the gray background regardless of preceding equation formatting.
I have checked https://github.com/posit-dev/positron/discussions/8684#discussion-8640338. It seems to be related to the issue I am experiencing, but it looks like it has not been properly fixed yet.
My Quarto version is 1.9.38 and my Positron version is 2026.07.0.
Attachments:
- Lingua principale
- TypeScript
- Stelle
- 652
- Fork
- 64
- Merge medio
- 8h 45m
- PR unite (30g)
- 36
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di quarto-dev/quarto
-
VS Code extension: `quarto preview` fails when the file path contains parentheses (path not shell-quoted)Forse già presa @Bondrewd-K l’ha presa 5 giorni fa. Apertabug vscode
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
quarto-dev/quarto#1194 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
quarto-dev/quarto#1139 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 90/100
quarto-dev/quarto#1138 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
quarto-dev/quarto#1137 ·
I maintainer di solito rispondono entro 1 giorno
-
Add dependabot?Forse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
quarto-dev/quarto#1135 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di quarto-dev/quarto
Issue simili
-
[Android] Nested transforms are composed in reverse orderForse già presa @Danyalo l’ha presa oggi. ApertaRepro provided
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
software-mansion/react-native-svg#3090 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
radix-ui/primitives#4228 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 95/100
rocketride-org/rocketride-server#2705 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
archon-ready archon-size-s archon-type-bug area: web
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
coleam00/Archon#4707 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
HarperFast/grafana-datasource#177 ·