Annotated code cell is dropped when the next annotated cell comes before any list
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
src/resources/filters/quarto-pre/code-annotation.luaを読み、特にpendingCodeCellを設定する実行可能セルの分岐と、隣接する分岐にある既存のflushPending()呼び出しを確認してください。Issueにある2つの注釈付きRセルと順序付きリストで再現し、両方のセルとその出力がレンダリングされ、注記が2つ目のセルの注釈にリンクすることを確認してください。報告者はテストスイート全体を実行していません。
索引モデルが issue の本文から書いたものです。
説明
Bug description
When two executable code cells with annotations follow each other and no ordered list sits between them, the first cell is dropped from the output.
Its code, its annotation markers and its output are all missing.
Only the second cell, with the list that follows it, is rendered.
I found this while working on Typst code annotations in #14170.
It happens on main for HTML, so it is not specific to Typst.
Steps to reproduce
---
title: Two annotated cells in a row
format: html
code-annotations: true
---
```{r}
first_cell <- 1 # <1>
first_cell
```
```{r}
second_cell <- 2 # <1>
second_cell
```
1. A note.
Actual behavior
The page shows only the second cell.
first_cell does not appear anywhere in the HTML.
Expected behavior
Both cells are rendered.
The note links to the annotation of the second cell, which is the one it sits under.
main (first cell missing) |
main with the one-line fix below |
|---|---|
Cause
In src/resources/filters/quarto-pre/code-annotation.lua, the branch that handles executable cells keeps an annotated cell in pendingCodeCell until the ordered list arrives.
When another annotated cell comes first, the new cell overwrites pendingCodeCell and the first one is never emitted.
The other branches, such as the one for plain code blocks, call flushPending() before they output a block.
A possible fix is to call flushPending() at the top of the if found then branch.
With that line, both cells are rendered, as in the right-hand screenshot.
I have not run the whole test suite with it.
Your environment
- OS: macOS
- Quarto: dev build, run with the
src/resourcesofmainat 210691f01 (set withQUARTO_SHARE_PATH), so the Lua filters are those ofmain. - R 4.6.1 with knitr 1.51.
Quarto check output
quarto check
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
[✓] Checking tools....................OK
TinyTeX: v2026.07
Chrome Headless Shell: (not installed)
VeraPDF: (not installed)
[✓] Checking LaTeX....................OK
[✓] Checking Chrome Headless....................OK
[✓] Checking basic markdown render....OK
[✓] Checking R installation...........OK
Version: 4.6.1
knitr: 1.51
rmarkdown: 2.31
[✓] Checking Knitr engine render......OK
[✓] Checking Python 3 installation....OK
Version: 3.9.6
Jupyter: (None)
[✓] Checking Julia installation...
- 主要言語
- JavaScript
- スター
- 6.1k
- フォーク
- 476
- 平均マージ
- 17時間 16分
- マージ済み PR(30日)
- 112
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
quarto-dev/quarto-cli のほかの issue
-
bug lua
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
quarto-dev/quarto-cli#15226 ·
メンテナーはふだん 1 日以内に返信
-
accessibility bug themes
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
quarto-dev/quarto-cli#15222 ·
メンテナーはふだん 1 日以内に返信
-
accessibility bug website-navigation
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
quarto-dev/quarto-cli#15190 ·
メンテナーはふだん 1 日以内に返信
-
Navbar dropdown toggles have `role="link"`対応中かも @Mittalnew が 3 日前に担当しました。 オープンaccessibility bug website-navigation
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
quarto-dev/quarto-cli#15188 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
accessibility bug html websites
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
quarto-dev/quarto-cli#15187 ·
メンテナーはふだん 1 日以内に返信
quarto-dev/quarto-cli の issue をすべて見る
似ている issue
-
[Feature Request] [Web] Expose kvCacheQuantizationBits in the onnxruntime-web WebGPU EP optionsオープンep:WebGPU platform:web quantization
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
microsoft/onnxruntime#33752 ·
メンテナーはふだん 2 日以内に返信
-
icon request
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
tabler/tabler-icons#1693 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 72/100
alvarotrigo/fullPage.js#4755 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
jlab-sensing/ENTS-backend#854 ·
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
andromarces/agent-loops#1242 ·
メンテナーはふだん 1 日以内に返信