Quarto visual mode / source mode switching breaks equation block formatting and syntax highlighting
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
- 48/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- typescript
- Lĩnh vực
- tooling
Hướng nghiên cứu
Start by reproducing the visual/source mode switch in a Quarto .qmd document using the multi-line equation and {#eq-label} examples from the report. Trace the visual/source mode entry point that reformats equation blocks, then verify that the closing $$ and label remain together, cross-references resolve, and following R code blocks retain their gray background.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Bug description
👋hello! This issue was originally posted at https://github.com/posit-dev/positron/issues/14763#issue-4838651653, and is reposted here at the request of @juliasilge .
When switching between visual mode and source mode in a Quarto .qmd document, the editor reformats multi-line equation blocks
$$
equation
$$
into single-line form
$$equation$$
, which causes two related bugs:
Bug 1 — Cross-reference label malformation
After a visual→source mode switch, a properly formatted numbered equation like:
$$
y_i = \alpha + \sum_{j=1}^{p} \beta_j x_{ij} + \varepsilon_i
$$ {#eq-liner-model}
is reformatted into:
$$\text{equation}$$
{#eq-a-error-format}
The label {#eq-a-error-format} is placed on a new line with a leading space, making it unrecognizable to the Quarto cross-reference engine. Rendering the document produces:
Unable to resolve crossref @eq-a-error-format
Bug 2 — Lost syntax highlighting (gray background)
A correctly formatted single-line numbered equation:
$$(\hat{\alpha}, \hat{\boldsymbol{\beta}}) = \arg\min \left\{ \sum_{i=1}^{N} \left(y_i - \alpha - \sum_{j=1}^{p} \beta_j x_{ij}\right)^2 \right\} \quad \text{subject to} \quad \sum_{j=1}^{p} |\beta_j| \leq t$$ {#eq-lasso}
renders correctly and cross-references work, but the equation block itself is not wrapped in the usual gray background box. Moreover, any R code blocks that follow this equation also lose their gray background.
Expected behavior:
Switching between visual and source mode should preserve the original multi-line equation block structure.
The {#eq-label} syntax should remain on the same line as the closing $$.
All code blocks should consistently display the gray background regardless of preceding equation formatting.
I have checked https://github.com/posit-dev/positron/discussions/8684#discussion-8640338. It seems to be related to the issue I am experiencing, but it looks like it has not been properly fixed yet.
My Quarto version is 1.9.38 and my Positron version is 2026.07.0.
Attachments:
- Ngôn ngữ chính
- TypeScript
- Star
- 655
- Fork
- 64
- Merge trung bình
- 22 giờ 16 phút
- Pull request đã merge (30 ngày)
- 42
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
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của quarto-dev/quarto
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
quarto-dev/quarto#1139 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 90/100
quarto-dev/quarto#1138 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
quarto-dev/quarto#1137 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add dependabot?Có thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
quarto-dev/quarto#1135 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
AceNodeView: programmatic setSelection() marks the cursor dirty, scrolling the document to the front matterCó thể đã có người làm @kevinushey đã nhận 54 ngày trước. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
quarto-dev/quarto#1099 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của quarto-dev/quarto
Issue tương tự
-
Sequências em espanhol: «Atualizado em», a aba «Fila» e o valor 'pause' ainda saem em portuguêsĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
melgarafael/DeskcommCRM#3104 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
🐛 [Bug] Mobile: on the login and registration pages the footer sits below the visible screenĐang mởbug service: webapp
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Ocelot-Social-Community/Ocelot-Social#10684 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
nicobailon/pi-subagents#2978 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
getsentry/sentry-conventions#732 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày