List tables: multiple table bodies (`.list-table-body`, or a table as a row) are rejected

Abierto
#1,334 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
html, markdown, rust

Línea de trabajo

The list-table parsing lives in q2's Rust code for the pandoc-ext list-table extension, where the row-must-be-a-bullet-list check raises Q-2-35. Start by finding that check and the code path for a row that is a nested div or pipe table, then compare with the reference behaviour in pandoc-ext/list-table. Done when the repro yields a thead with Fish and Ocean and a second tbody carrying the div's attributes, with no warning.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Tested with q2 0.47.0 on Windows 11.

In pandoc-ext/list-table, a row that is itself a table starts a new table body: "If a list row is a table […], its rows become a new table body." That table can be a nested .list-table-body div (a list table whose header-rows defaults to 0) or a pipe table, and its attributes go on the <tbody>. q2 rejects both forms.

Repro:

::: {.list-table}
- - Fish
  - Ocean
- ::: {.list-table-body}
  - - Arctic char
    - Arctic
  :::
:::

Actual:

Warning: [Q-2-35] Invalid List-Table Structure
 6 │ ╭─▶ - ::: {.list-table-body}
 9 │ ├─▶   :::
   │ ╰─────────── row 3 in list-table must contain a bullet list of cells

A pipe table as a row gives the same warning when a blank line separates it from the closing :::. Without the blank line it is a parse error instead (#1333).

Expected, as in pandoc-ext/list-table: one <thead> with Fish and Ocean, then a second <tbody> holding the Arctic char row. The new body carries the attributes of the .list-table-body div.

Lenguaje dominante
Rust
Estrellas
316
Forks
23
Merge medio
11 h 49 min
PR fusionados (30 d)
245

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de quarto-dev/q2

Todos los issues de quarto-dev/q2

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.