Annotated code cell is dropped when the next annotated cell comes before any list
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 76/100
Línea de trabajo
Lee src/resources/filters/quarto-pre/code-annotation.lua, especialmente la rama de celdas ejecutables que establece pendingCodeCell y las llamadas existentes a flushPending() en las ramas cercanas. Reproduce el problema con las dos celdas de R anotadas y la lista ordenada del issue. Después, confirma que se renderizan ambas celdas y sus resultados, y que la nota enlaza con la anotación de la segunda celda. La persona que informó del problema no ha ejecutado la suite completa de pruebas.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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...
- Lenguaje dominante
- JavaScript
- Estrellas
- 6.1k
- Forks
- 476
- Merge medio
- 15 h 46 min
- PR fusionados (30 d)
- 110
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de quarto-dev/quarto-cli
-
accessibility bug website-navigation
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
quarto-dev/quarto-cli#15190 ·
Los mantenedores suelen responder en 1 día
-
Navbar dropdown toggles have `role="link"`Posiblemente ocupada @Mittalnew la tomó hace 2 días. Abiertoaccessibility bug website-navigation
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
quarto-dev/quarto-cli#15188 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
accessibility bug html websites
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
quarto-dev/quarto-cli#15187 ·
Los mantenedores suelen responder en 1 día
-
enhancement themes websites
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
quarto-dev/quarto-cli#15179 ·
Los mantenedores suelen responder en 1 día
-
about-page bug layout websites
Dificultad 1/5 1-3 horas Aptitud para principiantes 82/100
quarto-dev/quarto-cli#15178 ·
Los mantenedores suelen responder en 1 día
Todos los issues de quarto-dev/quarto-cli
Issues similares
-
Android module suggestion (root)Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 74/100
fmhy/edit#6971 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
S: triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Dome-Works/DOME#129 ·
Los mantenedores suelen responder en 1 día
-
Add: Exclusiv DIGI TV 3Abiertochannels:add check:passed
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 6 días
-
documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
githubnext/gh-aw-workshop#5077 ·
Los mantenedores suelen responder en 1 día