`Q-2-49` warns on a span with an empty attribute block, `[text]{}`
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
- 75/100
Línea de trabajo
Empieza con la comprobación enlazada en crates/quarto-core/src/transforms/reference_link_diagnostics.rs (líneas 114–121) y sigue cómo distingue entre un bloque de atributos ausente y uno vacío. Reproduce el caso con el ejemplo proporcionado index.qmd y compara la advertencia con el span renderizado. Se considera terminado cuando [10]{} se renderiza como un span sin Q-2-49, mientras que un [10] sin atributos sigue generando la advertencia prevista.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Bug description
Each value box number in the metrics dashboard from #1131 comes from Python as Markdown("[" + value + "]{}"), and every render warns 12 times with Q-2-49.
The {} is there to make it a span, but the warning says the group "has no attribute block".
Pandoc reads [10]{} as a Span with an empty attribute, while a bare [10] stays literal text.
q2 renders [10]{} as <span>10</span>, like Quarto 1, so the output is right and only the warning is off.
An empty {} is admittedly an edge case, but it is a handy way to get a plain <span> in the HTML DOM, for example to target the value from CSS or JavaScript, and generated Markdown like this produces it easily.
The check looks at the parsed attribute, which is empty in both cases, so [10]{} and [10] look the same to it:
Steps to reproduce
index.qmd:
---
title: Hello
---
A [10]{} B and [x]{.y} C.
q2 render index.qmd
quarto render index.qmd
Actual behavior
q2 renders <span>10</span> and warns:
Warning: [Q-2-49] `[10]` has no attribute block, so it renders as an empty span and the brackets are discarded — the reader sees `10`. Write `\[10\]` to keep the brackets literal, or `[10]{.class}` if a span was intended.
╭─[ <dir>/index.qmd:5:3 ]
│
5 │ A [10]{} B and [x]{.y} C.
│ ───┬──
Quarto 1 renders the same <span>10</span> with no warning.
Expected behavior
No Q-2-49 when the source has an attribute block, even an empty one, since {} already says that a span is intended.
Your environment
- q2:
q2 (quarto 2) 0.45.0-nightly.20261112(nightly built from a76c96a), andq2 v0.44.0. - Quarto 1 for comparison: development build of quarto-dev/quarto-cli@fa74261.
- OS: macOS 27.2 (arm64).
- Terminal, no IDE.
- Lenguaje dominante
- Rust
- Estrellas
- 302
- Forks
- 22
- Merge medio
- 5 h 2 min
- PR fusionados (30 d)
- 213
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin 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/q2
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
quarto-dev/q2#1219 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
quarto-dev/q2#1179 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
quarto-dev/q2#1133 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
quarto-dev/q2#1103 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
quarto-dev/q2#1095 ·
Los mantenedores suelen responder en 1 día
Todos los issues de quarto-dev/q2
Issues similares
-
Selected chart highlights only its values, not its series names and category labelsPosiblemente ocupada @Higgs32584 la tomó hoy. Abiertobug priority: low ui
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
storytold/gridcraft#4390 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
bug bugfix priority: medium
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
BurntSushi/jiff#713 ·
Los mantenedores suelen responder en 1 día