Repository navigation
Conversation
A commented-out `_brand.yml` is useful as a template, but it parses to no YAML value, so brand validation failed with `YAML value is missing` and the render stopped. Both brand loaders now check for an empty YAML value first, warn once, and treat the file as absent. Invalid YAML still goes through validation so its error is reported as before. Fixes quarto-dev#14891
Collaborator
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #14891.
A
_brand.ymlthat is all comments parses to no YAML value, so the brand schema rejects it withYAML value is missingand the render stops. Both loaders inprojectResolveBrandnow check for an empty value first, print a warning (once per file) and carry on as if the file wasn't there. Invalid YAML still goes through validation, so its error is reported the same as before.What I checked on Windows 11:
_brand.ymlnext to a document: warning, document rendersbrand: my-brand.ymlin front matter pointing at a comment-only file: warning, rendersbrand: {light, dark}with a comment-only dark file: warning, the light brand is still appliedThe new smoke-all test (
2026/10/13/issue-14891) fails without the change and passes with it, and the existing brand tests (126 documents, 197 checks) pass.One thing I noticed along the way but left out of this PR: a brand file with broken YAML, e.g. an unclosed
[, fails withTypeError: Cannot read properties of undefined (reading 'value')rather than a validation message. That happens onmaintoo. Happy to open a separate issue for it.Checklist
I have (if applicable):
AI-assisted PR