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

Aberta
#1,253 1 comentário 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
57/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
typescript
Domínio
devtools

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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)
Linguagem predominante
TypeScript
Estrelas
665
Forks
69
Merge médio
2d 4h
PRs com merge (30d)
14

Preparar o ambiente

Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de quarto-dev/quarto

Todas as issues de quarto-dev/quarto

Issues semelhantes

Mais issues de TypeScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.