DOCX: callouts end with an empty paragraph, also when not needed
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 81/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- javascript
研究方向
閱讀 src/resources/filters/quarto-post/docx.lua 第 101–107 行附近,issue 指出空段落會被無條件加入。比較以段落結尾的 callout 內容和以表格結尾的內容,接著轉換提供的 DOCX 範例並檢查 word/document.xml。當額外段落只在尚未以段落結尾的內容之後有需要時才出現,即為完成。
由索引模型根據 Issue 內容生成。
描述
I have:
- searched the issue tracker for similar issues
- installed the latest version of Quarto CLI
- formatted my issue following the Bug Reports guide
Bug description
In DOCX output, callout boxes with the default appearance always end with an empty paragraph <w:p/> after their content. In LibreOffice Writer, it shows as an unnecessary empty line at the end of every such callout. (I don't have Word to check whether it shows the empty line there as well; it would be great if someone could confirm.)
The empty paragraph was added in #12642 (port of #8392, fixing #6357), because a table cell must end with a paragraph, e.g., when the callout content ends with a table.
However, it's added unconditionally:
https://github.com/quarto-dev/quarto-cli/blob/cda41021442b20964e10e265b9dcdf81f490c18e/src/resources/filters/quarto-post/docx.lua#L101-L107
Callouts with appearance="simple" or "minimal" are not affected.
The issue persists with the latest pre-release 1.12.3.
I investigated this with the help of an AI assistant, grounded in the Quarto source; I verified the findings myself.
Steps to reproduce
Create a source doc with DOCX output and a callout box:
---
format: docx
---
::: {.callout-note}
This is a callout.
:::
Run quarto render, and open the DOCX, e.g., in LibreOffice Writer.
Actual behavior
The callout's body cell in word/document.xml ends with an empty paragraph (abridged):
<w:tc>
<w:tcPr>...</w:tcPr>
<w:p>
...
<w:r>
<w:t xml:space="preserve">This is a callout.</w:t>
</w:r>
</w:p>
<w:p/>
</w:tc>
Here an annotated screenshot from LibreOffice:
Expected behavior
The empty paragraph is only added when the callout content does not already end with a paragraph, e.g., when it ends with a table.
Your environment
- IDE: none,
quarto renderon the command line - OS: Ubuntu Linux, kernel 7.0.0-43
- LibreOffice Writer 24.2.7.2
Quarto check output
$ quarto check
Quarto 1.11.9
[✓] Checking environment information...
Quarto cache location: /home/$USER/.cache/quarto
Project root: /home/$USER/
Project config: /home/$USER/_quarto.yml
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.10.0: OK
Dart Sass version 1.101.0: OK
Deno version 2.9.8: OK
Typst version 0.15.1: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.11.9
Path: /opt/quarto/bin
[✓] Checking tools....................OK
TinyTeX: v2026.04
Chrome Headless Shell: (not installed)
VeraPDF: (not installed)
[✓] Checking LaTeX....................OK
Using: TinyTex
Path: /home/$USER/.TinyTeX/bin/x86_64-linux
Version: 2026
[✓] Checking Chrome Headless....................OK
Using: Chrome found on system
Path: /usr/bin/google-chrome
Source: PATH
[✓] Checking basic markdown render....OK
[✓] Checking R installation...........OK
Version: 4.4.3
Path: /home/$USER/apps/miniforge3/lib/R
LibPaths:
- /home/$USER/apps/miniforge3/lib/R/library
knitr: 1.50
rmarkdown: 2.29
[✓] Checking Knitr engine render......OK
[✓] Checking Python 3 installation....OK
Version: 3.12.11 (Conda)
Path: /home/$USER/apps/miniforge3/bin/python
Jupyter: (None)
Jupyter is not available in this Python installation.
Install with conda install jupyter
[✓] Checking Julia installation...
- 主要語言
- JavaScript
- 星號
- 6.2k
- 分支
- 492
- 平均合併
- 15 小時 15 分鐘
- 30 天內合併 PR
- 94
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
quarto-dev/quarto-cli 的其他 Issue
-
bootstrap enhancement themes
難度 2/5 1-3 小時 新手友好度 70/100
quarto-dev/quarto-cli#15421 · 2 則留言 ·
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 85/100
quarto-dev/quarto-cli#15408 ·
維護者通常 1 天內回覆
-
accessibility bug
難度 2/5 1-3 小時 新手友好度 79/100
quarto-dev/quarto-cli#15401 · 1 個 reaction ·
維護者通常 1 天內回覆
-
bug lightbox
難度 2/5 1-3 小時 新手友好度 76/100
quarto-dev/quarto-cli#15393 ·
維護者通常 1 天內回覆
-
accessibility bug website-navigation websites
難度 2/5 1-3 小時 新手友好度 75/100
quarto-dev/quarto-cli#15392 ·
維護者通常 1 天內回覆
查看 quarto-dev/quarto-cli 的全部 Issue
相似的 Issue
-
bug help wanted
難度 2/5 1-3 小時 新手友好度 80/100
LangerSword/gitone#7 ·
-
good first issue reliability security should-have
難度 2/5 1-3 小時 新手友好度 78/100
-
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 13 天內回覆
-
[BUG]: chunkSource protocol stripping truncates URLs or reads an inner scheme可能已有人在做 @Bensonbenyi 今天認領。 未關閉
難度 1/5 1 小時以內 新手友好度 88/100
Mintplex-Labs/anything-llm#7338 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 74/100
維護者通常 1 天內回覆