Skip to content

fix: honour a boolean option written as a bare YAML false - #42

Merged
mcanouil merged 1 commit into
mainfrom
fix/boolean-false-options
Aug 1, 2026
Merged

fix: honour a boolean option written as a bare YAML false#42
mcanouil merged 1 commit into
mainfrom
fix/boolean-false-options

Conversation

@mcanouil

@mcanouil mcanouil commented Aug 1, 2026

Copy link
Copy Markdown
Owner

The shared metadata accessor guarded on truthiness, so auto-filename: false and its siblings were read as absent and the default applied instead. Only the quoted string worked, which this site had adopted.

Verified in a browser, since the HTML chrome is assembled by script at page load and a static grep cannot see it:

before, auto-filename: false -> wrappers: 2  titles: [yaml, script.py]
after,  auto-filename: false -> wrappers: 1  titles: [script.py]

The same check also disproves a claim the documentation carried, that a derived filename frames nothing in HTML. With auto-filename: true the block is framed and titled yaml, by the script rather than by Quarto's wrapper. The reference and the examples page are corrected, and the site drops the quoted workaround.

The shared metadata accessor guarded on truthiness, so `auto-filename: false`
and its siblings were read as absent and the default applied in their place.
Only the quoted string worked, which the site itself had adopted.

Also corrects the reference and the examples page. They said a derived
filename frames nothing in HTML, which is wrong: Quarto builds its wrapper
before this filter runs, so the block carries a marker class instead and the
injected script builds the window at page load, as it does for the rest of the
HTML chrome. Checked in a browser rather than in the static output.
@mcanouil mcanouil added the Type: Bug 🐛 Issues related to bugs, errors, or mistakes label Aug 1, 2026
@mcanouil mcanouil self-assigned this Aug 1, 2026
@mcanouil
mcanouil merged commit 69f6798 into main Aug 1, 2026
2 checks passed
@mcanouil
mcanouil deleted the fix/boolean-false-options branch August 1, 2026 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Bug 🐛 Issues related to bugs, errors, or mistakes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant