markdown_it.utils module#
- markdown_it.utils.EnvType#
Type for the environment sandbox used in parsing and rendering, which stores mutable variables for use by plugins and rules.
- class markdown_it.utils.OptionsDict(options: OptionsType)[source]#
Bases:
MutableMappingA dictionary, with attribute access to core markdownit configuration options.
- class markdown_it.utils.OptionsType[source]#
Bases:
TypedDictOptions for parsing.
- highlight: Callable[[str, str, str], str] | None#
Highlighter function: (content, lang, attrs) -> str.
- store_labels: NotRequired[bool]#
Store link label in link/image token’s metadata (under Token.meta[‘label’]).
This is a Python only option, and is intended for the use of round-trip parsing.
- strikethrough_single_tilde: NotRequired[bool]#
Allow single tilde
~text~for strikethrough in addition to double.
- class markdown_it.utils.PresetType[source]#
Bases:
TypedDictPreset configuration for markdown-it.
- components: MutableMapping[str, MutableMapping[str, list[str]]]#
Components for parsing and rendering.
- options: OptionsType#
Options for parsing.