quarto-dev / quarto-dev/quarto-cli
Using headings with profiles in book format always shows the first heading of the file
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
Bug description
I am using the project profiles to support multi-language documents (i.c. Dutch & French) by only showing the text for that language. This works nicely, but when trying to use the same method for headings the first heading always shows up even when it should not be shown based on the profile used.
Steps to reproduce
https://github.com/mvwestendorp/bug-heading-quarto-profile
quarto render . --profile NL renders a correct version in _report-NL
quarto render . --profile FR renders an incorrect version in _report-FR
Expected behavior
Only headings that are visible based on the project's profile are visible in the output
Actual behavior
The first heading of a file is always shown regardless of project profile
Your environment
- IDE: notepad
- Windows 10
Quarto check output
[>] Checking versions of quarto binary dependencies...
Pandoc version 3.1.1: OK
Dart Sass version 1.55.0: OK
[>] Checking versions of quarto dependencies......OK
[>] Checking Quarto installation......OK
Version: 1.3.433
Path: C:\Program Files\Quarto\bin
CodePage: 1252
[>] Checking basic markdown render....OK
[>] Checking Python 3 installation....OK
Version: 3.11.4
Path: C:/Program Files/Python311/python.exe
Jupyter: (None)
Jupyter is not available in this Python installation.
Install with py -m pip install jupyter
[>] Checking R installation...........OK
Version: 4.3.1
Path: C:/PROGRA~1/R/R-43~1.1
LibPaths:
- E:/Rlibrary
- C:/Program Files/R/R-4.3.1/library
knitr: 1.42
rmarkdown: 2.21
[>] 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
Start by cloning the linked reproduction and running quarto render . --profile NL and quarto render . --profile FR to compare the generated book output. Trace heading handling when profile-hidden content precedes the first heading; done means the FR output omits headings excluded by its profile while NL remains correct.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- markdown
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100