-
Notifications
You must be signed in to change notification settings - Fork 292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GFM admonition blocks #327
Comments
Hey, thanks for raising this! Yeah, this would be useful. It's interesting that it uses link syntax, and that links take precedence, e.g. in this:
It's actually a link because of the definition. I'm currently working on support for footnotes, see #273, which needed some more flexibility around link parsing and it has a new API to customize link processing. I think after that is done, admonition parsing should be pretty straightforward. |
I don't know how the internal parsing is working, but the context here seems relevant i.e. when parsing the admonition header, we need to know if it's within a block quote. |
any updates on this? |
No updates yet. Happy to prioritize this if someone wants to sponsor the work on this. Some notes from playing around with it: This is an admonition block, even with the two empty leading lines inside the block quote (not sure how that's done, is there a special check in block quote parsing, or is the marker detected only later in inline parsing, or as a post-processing step?):
This is not an admonition block though (trailing spaces after the marker are accepted though):
|
Is your feature request related to a problem? Please describe.
Github now support admonition blocks
Note
Highlights information that users should take into account, even when skimming.
Tip
Optional information to help a user be more successful.
Important
Crucial information necessary for users to succeed.
Warning
Critical content demanding immediate user attention due to potential risks.
Caution
Negative potential consequences of an action.
Describe the solution you'd like
Ideally adding a new gfm extension to common-mark makes sense, to support this admonition syntax.
Describe alternatives you've considered
No alternative.
Additional context
Source [1], [2]
The text was updated successfully, but these errors were encountered: