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

Đang mở
#1,334 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
html, markdown, rust
Lĩnh vực
documentation

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Rust
Star
316
Fork
23
Merge trung bình
11 giờ 49 phút
Pull request đã merge (30 ngày)
245

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của quarto-dev/q2

Tất cả issue của quarto-dev/q2

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.