MyST-Parser
MyST-Parser copied to clipboard
Add an extension to support GitHub alerts
Describe the feature you'd like to request
Last week, GitHub supported alerts as follows:
> [!NOTE]
> This is a note
[!NOTE] This is a note
See:
- https://github.blog/changelog/2023-12-14-new-markdown-extension-alerts-provide-distinctive-styling-for-significant-content/
- https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#alerts
I hope myst-parser can add an extension to provide the same feature to provide a consistent preview for GitHub and Sphinx.
Describe the solution you'd like
Add an option to myst_enable_extensions
to allow such syntax.
Describe alternatives you've considered
No response
Heya, it would probably be best if one first implemented a plugin in https://github.com/executablebooks/mdit-py-plugins
My only word of warning here, is that
- They have already flip-flopped on this, changing from the initial syntax they had before November 2023
> **Note**
to this new one, lets hope they don't change again 😒 - I would agree with others in the comments for this feature; https://github.com/orgs/community/discussions/16925#discussioncomment-2794978, it basically tends to break the semantics of the blockquote syntax
Its also frustrating that Github seem to have abandoned their past spec for Github Flavoured Markdown, https://github.github.com/gfm/, when implementing these new features.
+1 to the feature. While the syntax introduced by Github may suck, it is quite convenient to be able to produce documentation that is rendered in about the same way in both Github and Myst-powered web pages. Currently, the admonitions look bad on Github:
They only flip-flopped on it while developing it, and it seems to be quite stable now and documented in their help pages.