Comment spans render as body text in every format but docx
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
- 48/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- html, javascript
- Lĩnh vực
- backend, documentation
Hướng nghiên cứu
The report identifies Pandoc’s writers as the source of inlining and duplicate identifiers, and points to Quarto’s HTML theming, Typst template, and filters for possible handling. First compare the plain Pandoc output with Quarto rendering, then trace the relevant Quarto filters and templates. Done means comment text is not emitted as prose in non-docx output, with annotations or safe omission handled for the affected formats.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
What happens
Pandoc represents a Word comment as a pair of spans: .comment-start,
whose content is the note, and .comment-end, with a shared id. This
is pandoc's own vocabulary rather than something a user invented — its
docx reader produces exactly this from a commented .docx
(--track-changes=all), and its docx writer consumes it, so comments
round-trip through markdown.
Rendering the same document to any other format puts the note into the
document as ordinary prose.
Reproduction
comment.qmd:
---
title: "Comment probe"
---
The exposure window was [CONFIRM: that this is the window the
pharmacology supports.]{.comment-start id="0" author="Reviewer"}days 1
to 14[]{.comment-end id="0"}.
quarto render comment.qmd --to docx
quarto render comment.qmd --to html
quarto render comment.qmd --to typst
- docx — correct. A real Word comment from "Reviewer", anchored to
"days 1 to 14". Confirmed by readingword/comments.xmland
independently in LibreOffice, which shows three of three as ranged
annotations in a longer document. - html — the note is visible body text:
<span id="0" class="comment-start" data-author="Reviewer">CONFIRM: …</span>days 1 to 14<span id="0" class="comment-end"></span> - typst — the class is gone and the note is body text:
The exposure window was CONFIRM: …<0>days 1 to 14<0>. - pdf, through typst —
pdftotextfinds the note set in the middle
of the sentence, which is what a reader sees.
Why this is worth changing
The failure is silent. A plan rendered for Word carries reviewer notes
in the margin, and the same source rendered to HTML or PDF asserts them
as things the document says. "CONFIRM: that this is the window the
pharmacology supports" reads, in the PDF, as part of the methods.
For a regulatory document that is the difference between a note to a
reviewer and a statement to an agency, so the current behaviour is one
a user cannot safely leave to chance: it has to be worked around by not
emitting comments for those formats at all, which is what we now do.
What would be better, cheapest first
-
Do not inline the note. In a format with nowhere to put an
annotation, dropping the.comment-startspan's content and keeping
the text it was attached to is strictly better than printing it. A
dropped note is a known limitation; a printed one is a defect in the
document. -
Render a real annotation where the format has one. HTML needs no
pandoc change at all: the class anddata-author/data-datealready
reach the output, so Quarto could present it as a margin note or an
aside, in the same places.column-margincontent goes, or at least
style it as an annotation rather than prose. Typst has no comment, but
a margin note is idiomatic there too. -
The shared
idbecomes a duplicate identifier. Both spans of a
pair must carry the sameidfor the docx writer, and pandoc treats
anidattribute as the element's identifier. So HTML gets two
elements withid="0", which is invalid, and typst gets the label
<0>twice, which makes a label ambiguous. This is worth fixing even
if the annotation feature is not taken up.
Which part is pandoc's
Running plain pandoc -f markdown -t html and -t typst on the same
input gives the same output, so the inlining and the duplicate
identifier come from pandoc's writers rather than from Quarto's
filters. Items 1 and 3 may well belong upstream.
Item 2 is Quarto's either way, since the HTML theming and the typst
template are Quarto's — and a Quarto filter could cover all three for
Quarto's formats without waiting on pandoc, which is why this is filed
here.
Versions
Quarto 1.9.37, bundled pandoc 3.8.3, Windows 11. Also reproduced with
standalone pandoc 3.9.
- Ngôn ngữ chính
- JavaScript
- Star
- 6.2k
- Fork
- 482
- Merge trung bình
- 17 giờ 46 phút
- Pull request đã merge (30 ngày)
- 135
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- 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/quarto-cli
-
Listing category filter and URL hash disagree after Back, or with `&`, `=` or `%` in a categoryĐang mởbug listings
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
quarto-dev/quarto-cli#15340 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
brand bug typst
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
quarto-dev/quarto-cli#15311 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Notebook preview header title takes the heading colour on the primary backgroundCó thể đã có người làm @SabyaXSachi đã nhận 5 ngày trước. Đang mởaccessibility bug embed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
quarto-dev/quarto-cli#15306 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bootstrap bug themes
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
quarto-dev/quarto-cli#15304 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
accessibility bug code-blocks html themes
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
quarto-dev/quarto-cli#15303 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của quarto-dev/quarto-cli
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
0. Needs triage bug feature: api
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
agent-os ai bug good first issue help wanted
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area: documentation good first issue package: rule-data status: accepting prs
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
status: needs triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
mastra-ai/mastra#30109 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày