quarto-dev / quarto-dev/quarto-cli
yaml options are ignored if too many empty new lines are added
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
Bug description
I expect this to fail because of unknown documentclass (or use the locally defined asdf), but it instead compiles with the default value for documentclass.
---
title: "Quarto Basics"
format:
pdf:
documentclass: asdf
---
# Hi
foo
If I remove one or both of the empty lines before the ending, --- I get the expected behavior.
Gives the expected result: not compling
---
title: "Quarto Basics"
format:
pdf:
documentclass: asdf
---
# Hi
foo
same here
---
title: "Quarto Basics"
format:
pdf:
documentclass: asdf
---
# Hi
foo
I consider this to be a bug that should be fixed. Either not compile at all if empty lines before --- exists or comile and parse YAML correctly.
Environment
OS: Fedora 37
Editor: VScode.
quarto --version
1.2.269
Checklist
- Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
- Please format your issue so it is easier for us to read the bug report.
- Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- Please document the operating system you're running. If on Linux, please provide the specific distribution.
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 with the provided minimal .qmd example and reproduce the difference between one and multiple empty lines before the closing --- using Quarto. Trace the front-matter parsing path to determine why the YAML options are discarded, then verify that the example either fails for the unknown documentclass or preserves the parsed option consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100