👌 IMPROVE: Stop using YAML frontmatter-based directive options #49
Open
brunobeltran wants to merge 3 commits intoexecutablebooks:masterfrom
Open
👌 IMPROVE: Stop using YAML frontmatter-based directive options #49brunobeltran wants to merge 3 commits intoexecutablebooks:masterfrom
brunobeltran wants to merge 3 commits intoexecutablebooks:masterfrom
Conversation
Instead, we move to the more modern recommendation (per the MyST docs) of using the "colon" syntax for directive options.
ac53aba to
f5a3bd5
Compare
KyleKing
reviewed
Jan 6, 2026
Collaborator
KyleKing
left a comment
There was a problem hiding this comment.
For the review, I took a look at: brunobeltran/mdformat-myst@bruno/colon-fence-for-upstream...brunobeltran:mdformat-myst:bruno/use-modern-option-syntax
| LOGGER.warning("Invalid YAML in MyST directive options.") | ||
| return raw_content | ||
| if parsed: | ||
| formatted += "\n".join([f":{k}: {v}" for k, v in parsed.items()]) + "\n\n" |
Collaborator
There was a problem hiding this comment.
Would it make sense to have a way for people to opt-out of the newer formatting with a configuration option or do you think most people would prefer these changes?
Collaborator
|
Just following up, I would be happy to approve and mere, but I don't have the context on myst usage to know how much of a breaking change this would be and if we would want to support both (and if so, should it be opt-out of the newer formatting?) |
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.
Instead, move to the more modern recommendation (per the MyST docs)
of using the "colon" syntax for directive options.
I understand this PR might be much more controversial than #48 but I put it "on top" to be more convenient for what I believe to be the "typical" mdformat_myst user---someone who wants to use large the latest and greatest MyST conventions and just wants a formatter that works out-of-the-box.
Happy to squash/split, or otherwise modify commits as necessary! For example, if just this change might go in independentlyof #48, I can easily split off f5a3bd5
Fixes #47