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

Offen
#1,253 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
57/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
typescript
Bereich
devtools

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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)
Vorherrschende Sprache
TypeScript
Sterne
665
Forks
69
Ø Merge
2 T. 4 Std.
Gemergte PRs (30 T.)
14

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus quarto-dev/quarto

Alle Issues in quarto-dev/quarto

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.