‹›
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.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
key
is not known.