-
Notifications
You must be signed in to change notification settings - Fork 843
Description
Impacted plugin
None / Other
What
Update GitHub Flavored Markdown parser to support "Alerts" syntax
How
GitHub now extends Markdown syntax to support showing alerts, which would be nice to support as part of the WPCom_GHF_Markdown_Parser class.
Examples:
Note
Useful information that users should know, even when skimming content.
Tip
Helpful advice for doing things better or more easily.
Important
Key information users need to know to achieve their goal.
Warning
Urgent info that needs immediate user attention to avoid problems.
Caution
Advises about risks or negative outcomes of certain actions.
Syntax Reference:
> [!NOTE]
> Useful information that users should know, even when skimming content.
> [!TIP]
> Helpful advice for doing things better or more easily.
> [!IMPORTANT]
> Key information users need to know to achieve their goal.
> [!WARNING]
> Urgent info that needs immediate user attention to avoid problems.
> [!CAUTION]
> Advises about risks or negative outcomes of certain actions.
Use-Case:
Documentation on the WordPress Developer Resources site uses this parser class to parse Markdown shown on the site, for example from documentation authored in the Gutenberg plugin. Without support for this feature, it is difficult to author documentation which would consistently show alert content in both GitHub and the developer site.
Examples:
- Using
<div class="callout callout-warning"> - Using GitHub Flavored Markdown syntax
[!NOTE]