Incorrect comments for YAML multiline strings

Đang mở
#1,095 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
55/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript, vscode, yaml

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
TypeScript
Star
665
Fork
69
Merge trung bình
2 ngày 4 giờ
Pull request đã merge (30 ngày)
14

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của quarto-dev/quarto

Tất cả issue của quarto-dev/quarto

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.