Closed michalfita closed 10 months ago
The solution here is to write [!TIP]
(! inside the []), which is formatted by mdformat to \[!TIP\]
and rendered correctly by GitHub.
OK, I'm surprised this works that way... however, I think mdformat
shouldn't touch these brackets in such case - the result is much less pleasant to deal with in raw Markdown.
Thanks for the issue!
This plugin formats Markdown that follows the GFM spec (rendered text here https://github.github.com/gfm/ and source text here https://github.com/github/cmark-gfm/blob/master/test/spec.txt). The GFM spec does not include some Markdown features supported by github.com (very notably frontmatter and footnotes), and the notice box syntax falls in the same category.
In the current state, a separate plugin for the notice box syntax needs to be created (or alternatively a mdformat-github
or similar that aims to keep up with Github's syntax updates.
I'm closing the issue here seeing that this isn't a concern for the mdformat-gfm plugin.
Problem
GitHub now supports notice boxes as per https://github.com/orgs/community/discussions/16925 using special formatting of blockquotes, however
mdformat-gfm
escapes square brackets used in them:Original:
Changed:
This breaks our Markdown documents in
pre-commit
(michalfita/packer-plugin-cross#12)Suggestion
Add support to not escape square brackets if prepend with exclamation mark.