quarto-dev / quarto-dev/quarto-cli
`##` in markdown comments are not escaped but produce new header in rendered output
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
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
When using comments that contains markdown heading like
<!--
## Some Title
-->
the generated pdf contains a chapter called "Some Title"
Steps to reproduce
quarto create my-book-name(choose book type, not tested for other types)- Add the following lines to eg the first lines of
index.qmd:
<!--
## Some Title
-->
quarto preview --to pdf-> Observe thatSome Titleis a separate chapter (although it is commented out)
Actual behavior
Some Title is a separate chapter (although it is commented out)
Expected behavior
Some Title - section doesn't render
Your environment
- Fedora42
Quarto check output
Quarto 1.8.25
[✓] Checking environment information...
Quarto cache location: /home/alex/.cache/quarto
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.6.3: OK
Dart Sass version 1.87.0: OK
Deno version 2.3.1: OK
Typst version 0.13.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.8.25
Path: /opt/quarto-1.8.25/bin
[✓] Checking tools....................OK
Chromium: 869685
TinyTeX: (not installed)
[✓] Checking LaTeX....................OK
Using: Installation From Path
Path: /usr/bin
Version: 2023
[✓] Checking Chrome Headless....................OK
Using: Chrome found on system
Path: /usr/bin/chromium-browser
Source: PATH
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK
Version: 3.13.9
Path: /usr/bin/python3
Jupyter: 5.7.2
Kernels: .venv, myenv, python3, rust
[✓] Checking Jupyter engine render....OK
[✓] Checking R installation...........OK
Version: 4.5.2
Path: /usr/lib64/R
LibPaths:
- /home/alex/R/x86_64-redhat-linux-gnu-library/4.5
- /usr/lib64/R/library
- /usr/share/R/library
knitr: 1.45
rmarkdown: 2.24
[✓] Checking Knitr engine render......OK
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with quarto create my-book-name, the index.qmd comment, and quarto preview --to pdf. Trace how the commented heading reaches PDF rendering; done means ## Some Title inside the HTML comment no longer creates a separate chapter.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, markdown
- Domain
- content
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100