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