You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GitHub recently added supports for markdown admonitions / callouts. Docsify should add support for this format so that these elements are rendered as expected in both GitHub and Docsify environments.
GitHub Markdown:
> [!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.
GitHub Output:
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.
Proposal
Render GFM admonitions. Styles do not need to match GFM styles.
FYI: Add and override the blockquote parser in docsify by marked v13+.
exportconstblockquoteCompiler=({ renderer })=>(renderer.blockquote=function({ tokens }){constbody=this.parser.parse(tokens);// we could add the GFM admonitions / callouts support here.return`<blockquote>${body}</blockquote>`;});
jhildenbiddle
changed the title
Support GitHub style admonitions / callouts
Support GitHub style admonitions / alerts / callouts
Aug 7, 2024
Feature request
Support GFM admonitions / callouts.
Problem or desire
GitHub recently added supports for markdown admonitions / callouts. Docsify should add support for this format so that these elements are rendered as expected in both GitHub and Docsify environments.
GitHub Markdown:
GitHub Output:
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.
Proposal
?>
and!>
style helpers in favor of GFM-style blockquote helpers. This will address long-standing issues with multi-line helpers (e.g. Question about "General Tips" #483 and warning blockquotes do not render sub-elements correctly #1588) and poor rendering of these helpers when rendering Markdown outside of Docsify (e.g. GitHub).Implementation
The text was updated successfully, but these errors were encountered: