A callout with an id loses its number in the default title
メンテナーはふだん 1 日以内に返信
関連するプルリクエストがすでにマージされています。
- #1050 @cscheid による — マージ済み
評価
調査の方向性
crates/quarto-core/src/transforms/callout_resolve.rsの240〜262行あたりから始めます。issueでは、デフォルトタイトルが作成され、ref_typeを利用できる箇所とされています。提供されたindex.qmdをq2 render index.qmd --to htmlでレンダリングし、参照テキストと併せてcalloutのタイトルを確認します。デフォルトタイトルに同じ相互参照の接頭辞と番号が含まれ、Quarto 1と一致すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Bug description
A callout with an id such as nte-x and no title gets the title "Note 1" in Quarto 1.
q2 gives it the title "Note".
The reference @nte-x reads "Note 1" in both engines, so the page names a number that the callout does not show.
The default title is built from the callout type alone.
The transform knows that the callout is a cross-reference target (ref_type), but it does not add the number:
The comment in that block expects such a callout to carry a cross-reference prefix in its title, so the number seems meant to be there.
Steps to reproduce
index.qmd:
---
format: html
---
::: {#nte-x .callout-note}
Body.
:::
See @nte-x.
Run q2 and Quarto 1 on it:
q2 render index.qmd --to html
quarto render index.qmd --to html
Actual behavior
q2 gives the callout the title "Note", while the link text has the number:
<div class="callout-title-container flex-fill">
Note
</div>
...
<p>See <a href="#nte-x" class="quarto-xref">Note 1</a>.</p>
Quarto 1.12.0 writes "Note 1" in both places.
Expected behavior
The title reads "Note 1", as in Quarto 1.
The default title should use the same prefix and number as the cross-reference.
Your environment
- q2:
Q2 (quarto 2) 0.40.0-nightly.20261101(nightly built from a2a1cb9). - Quarto 1 for comparison: 1.12.0 (pre-release).
- OS: macOS 27.2 (arm64).
- Terminal, no IDE.
- 主要言語
- Rust
- スター
- 293
- フォーク
- 20
- 平均マージ
- 5時間 38分
- マージ済み PR(30日)
- 199
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
quarto-dev/q2 のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
quarto-dev/q2#1103 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
quarto-dev/q2#1095 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
quarto-dev/q2#1031 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
quarto-dev/q2#957 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
quarto-dev/q2#1115 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
RustCrypto/utils#1597 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
max-sixty/worktrunk#4727 · コメント 7 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
メンテナーはふだん 1 日以内に返信
-
follow-up
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
carrick-sh/carrick#1859 ·
メンテナーはふだん 1 日以内に返信