MCPcopy Create free account
hub / github.com/ronreiter/interactive-tutorials / finder

Method finder

markdown/extensions/footnotes.py:82–91  ·  view source on GitHub ↗
(element)

Source from the content-addressed store, hash-verified

80 def findFootnotesPlaceholder(self, root):
81 """ Return ElementTree Element that contains Footnote placeholder. """
82 def finder(element):
83 for child in element:
84 if child.text:
85 if child.text.find(self.getConfig("PLACE_MARKER")) > -1:
86 return child, True
87 if child.tail:
88 if child.tail.find(self.getConfig("PLACE_MARKER")) > -1:
89 return (child, element), False
90 finder(child)
91 return None
92
93 res = finder(root)
94 return res

Callers

nothing calls this directly

Calls 2

getConfigMethod · 0.80
findMethod · 0.45

Tested by

no test coverage detected