(self, root: etree.Element)
| 423 | self.footnotes = footnotes |
| 424 | |
| 425 | def run(self, root: etree.Element) -> None: |
| 426 | footnotesDiv = self.footnotes.makeFootnotesDiv(root) |
| 427 | if footnotesDiv is not None: |
| 428 | result = self.footnotes.findFootnotesPlaceholder(root) |
| 429 | if result: |
| 430 | child, parent, isText = result |
| 431 | ind = list(parent).index(child) |
| 432 | if isText: |
| 433 | parent.remove(child) |
| 434 | parent.insert(ind, footnotesDiv) |
| 435 | else: |
| 436 | parent.insert(ind + 1, footnotesDiv) |
| 437 | child.tail = None |
| 438 | else: |
| 439 | root.append(footnotesDiv) |
| 440 | |
| 441 | |
| 442 | class FootnoteReorderingProcessor(Treeprocessor): |
nothing calls this directly
no test coverage detected