Render crashes when a proof, remark or solution block has an id that is not a cross-reference id

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

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

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

評価

難易度
3/5
見積もり時間
半日
初心者へのやさしさ
72/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
lua
領域
backend

調査の方向性

Start by reading parseblockreftargets.lua at the reported failing line and trace how proof, remark, and solution IDs are handled; then inspect crossref/index.lua at its reported nil table index. Reproduce with the supplied Quarto document using both #my-proof and #myproof IDs in HTML, then check that each renders as an unnumbered block retaining its ID.

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

説明

bug crossref
I have
  • searched the issue tracker for similar issues
  • installed the latest version of Quarto CLI
  • formatted my issue following the Bug Reports guide
Bug description

A proof, remark or solution block that carries an id crashes the render when the id is not one of the cross-reference prefixes (prf-, rem-, sol-).
It fails in HTML and in Typst.
A theorem block such as ::: {#my-thm .theorem} with the same kind of id renders fine.

The error depends on the id:

  • With a hyphen, such as #my-proof, refType returns my, which is not a cross-reference category, so parseblockreftargets.lua indexes a nil category.
  • Without a hyphen, such as #myproof, the block reaches add_crossref with no category, and crossref/index.lua uses a nil table index.

I came across this while working on something else, and narrowed it down to the small example below.

Steps to reproduce
---
title: "Proof with an id"
format: html
---

::: {#my-proof .proof}
A proof with an id.
:::

Then run quarto render.
Replacing #my-proof with #myproof gives the second error.

Actual behavior

With #my-proof:

.../resources/filters/./quarto-pre/parseblockreftargets.lua:44: attempt to index a nil value (field '?')

With #myproof:

.../resources/filters/./crossref/index.lua:48: table index is nil
Expected behavior

The block renders as an unnumbered proof that keeps its id, as it does without an id.

Your environment
  • IDE: none, command line.
  • OS: macOS 27.0.
Quarto check output

Reproduced with a development build of main at 4c7b5d25d.

Quarto 99.9.9

[✓] Checking environment information...
      Quarto cache location: /Users/mcanouil/Library/Caches/quarto
      Project: none found (single-file mode)

[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.10.0: OK
      Dart Sass version 1.101.0: OK
      Deno version 2.7.14: OK
      Typst version 0.15.1: OK

[✓] Checking versions of quarto dependencies......OK

[✓] Checking Quarto installation......OK
      Version: 99.9.9
      commit: 4c7b5d25da9e3f4197289b29ec579a440d15f692
      Path: /Users/mcanouil/Projects/quarto-dev/quarto-cli/package/dist/bin

[✓] Checking tools....................OK
      TinyTeX: v2026.07
      Chrome Headless Shell: (not installed)
      VeraPDF: (not installed)

[✓] Checking LaTeX....................OK
      Using: TinyTex
      Path: /Users/mcanouil/Library/TinyTeX/bin/universal-darwin
      Version: 2026

[✓] Checking Chrome Headless....................OK
      Using: Chrome from QUARTO_CHROMIUM
      Path: /Applications/Brave Browser.app/Contents/MacOS/Brave Browser

[✓] Checking basic markdown render....OK

ℹ R version 4.6.1 (2026-06-24)
! Config '~/.Rprofile' was loaded!

[✓] Checking R installation...........OK
      Version: 4.6.1
      Path: /Library/Frameworks/R.framework/Versions/4.6/Resources
      LibPaths:
        - /Users/mcanouil/Library/R/arm64/4.6/library
        - /Library/Frameworks/R.framework/Versions/4.6/Resources/library
      knitr: 1.51
      rmarkdown: 2.31

[✓] Checking Knitr engine render......OK

[✓] Checking Python 3 installation....OK
      Version: 3.14.7
      Path: /Users/mcanouil/Projects/quarto-dev/quarto-cli/tests/.venv/bin/python3
      Jupyter: 5.9.1
      Kernels: julia-1.12, python3

[IPKernelApp] WARNING | Kernel is running over TCP without encryption. All communication (including code and outputs) is sent in plain text and is susceptible to eavesdropping. Use IPC transport or launch with kernel manager-provisioned CurveZMQ keys to enable transport encryption.

[✓] Checking Jupyter engine render....OK

[✓] Checking Julia installation...
主要言語
JavaScript
スター
6.1k
フォーク
478
平均マージ
17時間 26分
マージ済み PR(30日)
126

環境構築

はじめの一歩

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

quarto-dev/quarto-cli のほかの issue

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

似ている issue

JavaScript の issue をもっと見る

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

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