Annotated code cell is dropped when the next annotated cell comes before any list
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Anfängerfreundlichkeit
- 76/100
Rechercherichtung
Lies src/resources/filters/quarto-pre/code-annotation.lua, besonders den Zweig für ausführbare Zellen, der pendingCodeCell setzt, sowie die vorhandenen Aufrufe von flushPending() in den benachbarten Zweigen. Reproduziere den Fehler mit den beiden annotierten R-Zellen und der geordneten Liste im Issue. Bestätige dann, dass beide Zellen und ihre Ausgaben gerendert werden und die Notiz auf die Annotation der zweiten Zelle verweist. Der Reporter hat die vollständige Testsuite nicht ausgeführt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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...
- Vorherrschende Sprache
- JavaScript
- Sterne
- 6.1k
- Forks
- 476
- Ø Merge
- 17 Std. 16 Min.
- Gemergte PRs (30 T.)
- 112
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus quarto-dev/quarto-cli
-
bug lua
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
quarto-dev/quarto-cli#15226 ·
Maintainer antworten meist innerhalb von 1 Tag
-
accessibility bug themes
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
quarto-dev/quarto-cli#15222 ·
Maintainer antworten meist innerhalb von 1 Tag
-
accessibility bug website-navigation
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 83/100
quarto-dev/quarto-cli#15190 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Navbar dropdown toggles have `role="link"`Evtl. vergeben @Mittalnew hat das vor 3 Tagen übernommen. Offenaccessibility bug website-navigation
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
quarto-dev/quarto-cli#15188 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
accessibility bug html websites
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
quarto-dev/quarto-cli#15187 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in quarto-dev/quarto-cli
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
Graphify-Labs/graphify#4860 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
CommandCodeAI/command-code#1088 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
CanadaHonk/porffor#426 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
RIT-Software-Engineering/RIT-SE-Senior-Project#546 ·
Maintainer antworten meist innerhalb von 1 Tag