-
-
Notifications
You must be signed in to change notification settings - Fork 146
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
Add GitHub style alerts / admonitions #519
Conversation
Run on Fri Jan 17 01:36:04 UTC 2025 |
Also allows overriding the title by specifying a string after the alert syntax.
612eb62
to
8686e9e
Compare
This is fully working. Just need to
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! (Minor change: XML attribute needs to be quoted.)
Co-authored-by: Talya Connor <[email protected]>
I did run fuzzing with |
This adds supports for markdown alerts (github/gitlab style) as support for these was recently added to comrak. This for now looks close a block quote except it also contains a title colored the same color as the vertical bar prefix that shows up on the left of the block quote. See kivikakk/comrak#519 and kivikakk/comrak#521 for syntax but basically this: ```markdown > [!note] > this is a note > [!tip] > this is a tip > [!important] > this is important > [!warning] > this is warning! > [!caution] > this advises caution! >>> [!note] other title ez multiline >>> ``` Renders like this: ![image](https://github.com/user-attachments/assets/219024ae-b635-4bf2-87ba-e252b64ebd67)
Just wanted to express my appreciation for this feature! Sometimes open source is awesome: I just bump my comrak version (+enable the option) and suddenly I have support for this feature! |
This adds support for GitHub style alerts, such as
Note
Coming very soon
All the types are supported,
NOTE
,TIP
,IMPORTANT
,WARNING
, andCAUTION
A couple enhancements have been made:
you can use them anywhere a blockquote can be used, such as in a list item. So this will work:
you can override the title that's displayed by putting text after the trigger. For example:
Instead of showing "Note" as the title, it will show "Exciting news!"
Related to #472