Incorrect comments for YAML multiline strings

Aberta
#1,095 2 comentários 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
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
55/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
typescript, vscode, yaml

Direção de pesquisa

Reproduce the issue in Positron using the supplied .qmd example, applying “Add line comment” to either LaTeX line inside the YAML multiline string. Compare the generated comment with the expected HTML-style comment and verify that rendering completes without the reported LaTeX error.

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

Descrição

bug vscode
Bug description

Hello, and apologies if this should be reported elsewhere.

When commenting out a .qmd line that's part of a YAML multiline string, I get # in Positron (which leads to an error when rendering). In RStudio, I get <!-- (which renders fine).

Many thanks in advance!

Steps to reproduce

Open the following .qmd in Positron, and then do "Add line comment" on either \setlength... or \usepackage....

---
title: "Hello"
format: 
  pdf:
    include-in-header: 
      text: |
        \setlength\parindent{.2in}
        \usepackage{indentfirst}
---

## Hello

Hello

Hello

The line gets prefixed by #. Finally, render and get and error:

ERROR: compilation failed- error You can't use `macro parameter character #' in vertical mode.
Expected behavior

In RStudio, the lines get commented out in HTML style, e.g.: <!-- \usepackage{indentfirst} -->. This renders without errors.

Your environment

Positron Version: 2026.08.1 build 2
Code - OSS Version: 1.124.0
Commit: 48dc4cee686939f35fe4a714d34375f67fd62082
Date: 2026-08-09T13:35:16-06:00
Electron: 42.2.0
Chromium: 148.0.7778.97
Node.js: 24.15.0
V8: 14.8.178.14-electron.0
OS: Linux x64 7.1.8-200.fc44.x86_64

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.