Process indented children of definition list items.
| 91 | |
| 92 | |
| 93 | class 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 | |
| 109 | class DefListExtension(Extension): |