MCPcopy Create free account
hub / github.com/Python-Markdown/markdown / DefListIndentProcessor

Class DefListIndentProcessor

markdown/extensions/def_list.py:93–106  ·  view source on GitHub ↗

Process indented children of definition list items.

Source from the content-addressed store, hash-verified

91
92
93class DefListIndentProcessor(ListIndentProcessor):
94 """ Process indented children of definition list items. """
95
96 # Definition lists need to be aware of all list types
97 ITEM_TYPES = ['dd', 'li']
98 """ Include `dd` in list item types. """
99 LIST_TYPES = ['dl', 'ol', 'ul']
100 """ Include `dl` is list types. """
101
102 def create_item(self, parent: etree.Element, block: str) -> None:
103 """ Create a new `dd` or `li` (depending on parent) and parse the block with it as the parent. """
104
105 dd = etree.SubElement(parent, 'dd')
106 self.parser.parseBlocks(dd, [block])
107
108
109class DefListExtension(Extension):

Callers 1

extendMarkdownMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected