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

Method run

markdown/extensions/footnotes.py:435–449  ·  view source on GitHub ↗
(self, root: etree.Element)

Source from the content-addressed store, hash-verified

433 self.footnotes = footnotes
434
435 def run(self, root: etree.Element) -> None:
436 footnotesDiv = self.footnotes.makeFootnotesDiv(root)
437 if footnotesDiv is not None:
438 result = self.footnotes.findFootnotesPlaceholder(root)
439 if result:
440 child, parent, isText = result
441 ind = list(parent).index(child)
442 if isText:
443 parent.remove(child)
444 parent.insert(ind, footnotesDiv)
445 else:
446 parent.insert(ind + 1, footnotesDiv)
447 child.tail = None
448 else:
449 root.append(footnotesDiv)
450
451
452class FootnoteReorderingProcessor(Treeprocessor):

Callers

nothing calls this directly

Calls 3

makeFootnotesDivMethod · 0.80
removeMethod · 0.80

Tested by

no test coverage detected