Skip to content

Conversation

@brunobeltran
Copy link

@brunobeltran brunobeltran commented Jan 4, 2026

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

Instead, we move to the more modern recommendation (per the MyST docs)
of using the "colon" syntax for directive options.
Copy link
Collaborator

@KyleKing KyleKing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

@KyleKing KyleKing self-requested a review January 6, 2026 03:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Why is YAML synxtax preffered over Colon syntax for directive blocks?

2 participants