Skip to main content

gfm_alerts_plugin

FunctionSource

gfm_alerts_plugin(
md: MarkdownIt,
titles: Sequence[str] | None = None,
icons: Mapping[str, str] | None = None,
class_prefix: str = "markdown-alert",
*,
parse_nested: bool = True,
match_case_sensitive: bool = False
)

Add the GitHub-flavored Markdown style alert box plugin.

Arguments​

Requires​

NameTypeRequired
Description
mdMarkdownItThe markdown-it handle where the plugin will be injected.
titlesSequence[str] | None

The allowed titles that would be used to detect the alert box.

If not specified, will use the default list: ("tip", "note", "important", "warning", "caution")

iconsMapping[str, str] | NoneThe icon storage. It is a mapping from the title to the icon SVG text.
class_prefixstrThe prefix of the class name when the alert box is produced.
parse_nestedboolA flag. If specified, will render the nested alert boxes.
match_case_sensitiveboolA flag. If specified, will match the case of the identifier (title) when rendering the alert boxes.