Quarto visual mode / source mode switching breaks equation block formatting and syntax highlighting
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- typescript
- Área
- tooling
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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:
- Lenguaje dominante
- TypeScript
- Estrellas
- 652
- Forks
- 64
- Merge medio
- 8 h 45 min
- PR fusionados (30 d)
- 36
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de quarto-dev/quarto
-
VS Code extension: `quarto preview` fails when the file path contains parentheses (path not shell-quoted)Posiblemente ocupada @Bondrewd-K la tomó hace 4 días. Abiertobug vscode
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
quarto-dev/quarto#1194 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
quarto-dev/quarto#1139 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 90/100
quarto-dev/quarto#1138 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
quarto-dev/quarto#1137 ·
Los mantenedores suelen responder en 1 día
-
Add dependabot?Quizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
quarto-dev/quarto#1135 ·
Los mantenedores suelen responder en 1 día
Todos los issues de quarto-dev/quarto
Issues similares
-
Object parameters lose their structure when resources is enabledPosiblemente ocupada @asts-top la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 2 días
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
jaegertracing/jaeger-ui#4618 ·
Los mantenedores suelen responder en 1 día
-
pending close triaging
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
anomalyco/opencode#56765 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
area:plugins enhancement platform:vscode
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
anthropics/claude-code#103166 ·
Los mantenedores suelen responder en 1 día
-
Types: FlashListProps imports ViewabilityConfig from react-native, removed in RN 0.87+Posiblemente ocupada @efegokdemir la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Shopify/flash-list#2540 ·