Math preview in Positron breaks when display math contains inline code (`{r} expr`), though the document renders correctly

Ouverte
#1,253 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
57/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
Active
Stack technique
typescript
Domaine
devtools

Piste de recherche

Start by locating the VS Code or Positron display-math preview code that receives Quarto inline executable code; the issue does not name a file or test. Reproduce with the provided repro.qmd example, then inspect the preview path and its tests. Done when the preview handles the inline {r} expressions gracefully while the document continues to render correctly.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

bug vscode
Bug description

When a display math block ($$ ... $$) contains inline executable code using the {r} expr syntax, the equation preview in VS Code fails to render. The document itself is valid: quarto render runs the inline code and produces correct output (the math shows the computed value). Only the preview is broken.

Steps to reproduce
obs_slope_x1 <- 2.31
$$
P \big( b_1 \leq -`{r} obs_slope_x1`~or~ b_1 \geq `{r} obs_slope_x1` ~|~ \beta_1 = 0 \big)
$$
  • Save the above as repro.qmd and open it in Positron.
  • Hover over, or otherwise trigger the preview of, the display math block.
  • The preview fails or shows broken output.
  • Preview the document. It succeeds.
Screenshot 2026-11-29 at 8 51 41 PM
Actual behavior

The preview passes the raw backtick and {r} syntax to the math renderer, so the preview breaks, even though the syntax is valid Quarto and renders correctly.

Expected behavior

The preview should either:

  • render the math with the inline code shown as a placeholder (for example, replace {r} obs_slope_x1 with \text{obs_slope_x1} or a similar marker), or
  • degrade gracefully (for example, a note that the equation contains inline code), instead of a broken preview.
Your environment
  • Quarto CLI: 1.11.9
  • Positron Version: 2026.11.1 build 4
  • R: 4.6.2
  • OS: macOS (Darwin 27.2.0)
Langage dominant
TypeScript
Étoiles
665
Forks
69
Merge moyen
2 j 4 h
PR mergées (30 j)
14

Préparer son environnement

Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de quarto-dev/quarto

Toutes les issues de quarto-dev/quarto

Issues similaires

Plus d'issues TypeScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.