Parser: a stray `{key=value}` in a paragraph is accepted silently (passes --dry-run, dropped in HTML)
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
- 52/100
Hướng nghiên cứu
Start by tracing how q2 parses standalone attributes and how q2 render --dry-run reports parse problems; the issue does not name source files or tests. Reproduce with Text {colspan=2} here. and compare dry-run with HTML and docx output. Done means dry-run reports the stray attribute with its location, and rendering no longer silently drops the text.
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.48.0 on Windows 11. Split from #1322, which now covers only the JSON writer's hidden diagnostics.
A {key=value} block in the middle of a paragraph is accepted as a standalone attribute with nothing to attach to. Nothing reports it:
q2 render --dry-runfinds no problems.--to htmlsucceeds and drops the text without a warning.--to docx(and other formats that go through pandoc) fails in the JSON writer with "Standalone attribute not supported in JSON format" (see #1322).
This happens easily after pasting text, or when trying an attribute somewhere q2 doesn't support one (for example a list-table cell attribute outside a list table).
Repro
Text {colspan=2} here.
$ q2 render s4.qmd --dry-run
Checked 1 file — no problems found
$ q2 render s4.qmd --to html
<p>Text here.</p>
Proposal: report a standalone attribute that has nothing to attach to at parse time, with its location:
- An error, not a warning. It already stops every format that goes through pandoc, so making it an error everywhere means HTML and docx behave the same. HTML stops losing text without saying so, and
--dry-runcatches what a docx render would fail on. - A new Q-code, with a hint that attributes go directly after a span (
[text]{key=value}), a heading, or a div/code fence.
If a warning that keeps the text as literal text fits q2 better, that would also solve it for us. What matters is that --dry-run reports it.
- Ngôn ngữ chính
- Rust
- Star
- 321
- Fork
- 23
- Merge trung bình
- 11 giờ 39 phút
- Pull request đã merge (30 ngày)
- 251
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của quarto-dev/q2
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
quarto-dev/q2#1446 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
quarto-dev/q2#1435 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
quarto-dev/q2#1095 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
quarto-dev/q2#1448 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
quarto-dev/q2#1447 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của quarto-dev/q2
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
ProvableHQ/snarkOS#4817 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 65/100
facebookexperimental/reverie#193 ·
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
needs triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
pbakaus/impeccable#1748 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
farion1231/cc-switch#10196 ·
Maintainer thường phản hồi trong vòng 1 ngày