Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Quarto visual mode / source mode switching breaks equation block formatting and syntax highlighting

オープン
#1,047 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
typescript
領域
tooling

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

bug visual-editor
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:

Image Image Image
主要言語
TypeScript
スター
652
フォーク
64
平均マージ
8時間 45分
マージ済み PR(30日)
36

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

quarto-dev/quarto のほかの issue

quarto-dev/quarto の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。