Repository navigation
refactor: read the hot-fix defaults from the schema - #100
Merged
Merged
Conversation
Schema 2.4.0 builds the hotfix object from the defaults of its properties, so a default changed in _schema.yml alone now takes effect. HOTFIX_DEFAULTS stays only as the fallback for a format the extension does not act on and for a schema that cannot be read.
The schema types each hot-fix as a boolean or a map, so a map default is now read like the same map in the document rather than dropped.
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.
The hot-fix defaults now come from
_schema.yml, like the seven top-level options, so a default changed in the schema alone takes effect.The vendored validator moves to schema 2.4.0, which builds an absent
type: objectoption from the defaults of its properties (mcanouil/quarto-wizard#544).checker:optionstherefore answershotfix = {code-annotations = true, skylighting = true}when the document sets none, and the hot-fix loop reads its defaults from there.HOTFIX_DEFAULTSstays as the fallback for a format the extension does not act on and for a schema that cannot be read.quarto-lua-modules moves to 2.13.0 as well; its six vendored files are byte-identical, so only the manifest changes.
A schema default can take the map form the schema allows, such as
{enabled: false}, and is read like the same map in the document.Only a metadata map is read as a map; any other value, a list included, is read as text as before.
New tests render projects with their own copy of the extension: a skylighting default of
false, a map default, and no schema at all.Two more pin a list value and the
quarto-versionthreshold, on both sides of the running Quarto.example.qmdrenders byte-identical tomainin HTML and Typst.