Skip to content

markdown.extensions.def_list §

Adds parsing of Definition Lists to Python-Markdown.

See the documentation for details.

Classes:

markdown.extensions.def_list.DefListProcessor(parser: BlockParser) §

Bases: BlockProcessor

Process Definition Lists.

markdown.extensions.def_list.DefListIndentProcessor(*args) §

Bases: ListIndentProcessor

Process indented children of definition list items.

Methods:

  • create_item –

    Create a new dd or li (depending on parent) and parse the block with it as the parent.

Attributes:

markdown.extensions.def_list.DefListIndentProcessor.ITEM_TYPES class-attribute instance-attribute §

Include dd in list item types.

Defined Value:

ITEM_TYPES = ['dd', 'li']

markdown.extensions.def_list.DefListIndentProcessor.LIST_TYPES class-attribute instance-attribute §

Include dl is list types.

Defined Value:

LIST_TYPES = ['dl', 'ol', 'ul']

markdown.extensions.def_list.DefListIndentProcessor.create_item(parent: etree.Element, block: str) -> None §

Create a new dd or li (depending on parent) and parse the block with it as the parent.

markdown.extensions.def_list.DefListExtension(**kwargs) §

Bases: Extension

Add definition lists to Markdown.

Methods:

markdown.extensions.def_list.DefListExtension.extendMarkdown(md) §

Register the processors.

Class Instance Registry Name Priority
DefListIndentProcessor blockprocessors defindent 85
DefListProcessor blockprocessors deflist 25