βΉβΊ
markdown.extensions
ΒΆ
Markdown accepts an Extension instance for each extension. Therefore, each extension
must to define a class that extends Extension and over-rides the
extendMarkdown method. Within this class one can manage configuration
options for their extension and attach the various processors and patterns which make up an extension to the
Markdown instance.
Modules:
-
abbrβThis extension adds abbreviation handling to Python-Markdown.
-
admonitionβAdds rST-style admonitions to Python-Markdown.
-
attr_listβAdds attribute list syntax to Python-Markdown.
-
codehiliteβAdds code/syntax highlighting to standard Python-Markdown code blocks.
-
def_listβAdds parsing of Definition Lists to Python-Markdown.
-
extraβA compilation of various Python-Markdown extensions that imitates
-
fenced_codeβThis extension adds Fenced Code Blocks to Python-Markdown.
-
footnotesβAdds footnote handling to Python-Markdown.
-
legacy_attrsβAn extension to Python Markdown which implements legacy attributes.
-
legacy_emβThis extension provides legacy behavior for connected_words.
-
md_in_htmlβParse Markdown syntax within raw HTML.
-
metaβThis extension adds Meta Data handling to markdown.
-
nl2brβA Python-Markdown extension to treat newlines as hard breaks.
-
sane_listsβModify the behavior of Lists in Python-Markdown to act in a sane manor.
-
smartyβConvert ASCII dashes, quotes and ellipses to their HTML entity equivalents.
-
tablesβAdds parsing of tables to Python-Markdown.
-
tocβAdd table of contents support to Python-Markdown.
-
wikilinksβConverts
[[WikiLinks]]to relative links.
Classes:
-
ExtensionβBase class for extensions to subclass.
βΉβΊ
markdown.extensions.Extension(**kwargs)
ΒΆ
Base class for extensions to subclass.
Methods:
-
getConfigβReturn a single configuration option value.
-
getConfigsβReturn all configuration options.
-
getConfigInfoβReturn descriptions of all configuration options.
-
setConfigβSet a configuration option.
-
setConfigsβLoop through a collection of configuration options, passing each to
-
extendMarkdownβAdd the various processors and patterns to the Markdown Instance.
Attributes:
βΉβΊ
markdown.extensions.Extension.config: Mapping[str, list]
class-attribute
instance-attribute
ΒΆ
βΉβΊ
markdown.extensions.Extension.setConfig(key: str, value: Any) -> None
ΒΆ
Set a configuration option.
If the corresponding default value set in config
is a bool value or None, then value is passed through
parseBoolValue before being stored.
Parameters:
Raises:
-
KeyErrorβIf
keyis not known.

