MCPcopy Create free account
hub / github.com/PageBot/PageBot / finder

Method finder

Lib/pagebot/contributions/markdown/footnotes.py:126–137  ·  view source on GitHub ↗
(element)

Source from the content-addressed store, hash-verified

124 def findFootnotesPlaceholder(self, root):
125 """ Return ElementTree Element that contains Footnote placeholder. """
126 def finder(element):
127 for child in element:
128 if child.text:
129 if child.text.find(self.getConfig("PLACE_MARKER")) > -1:
130 return child, element, True
131 if child.tail:
132 if child.tail.find(self.getConfig("PLACE_MARKER")) > -1:
133 return child, element, False
134 child_res = finder(child)
135 if child_res is not None:
136 return child_res
137 return None
138
139 res = finder(root)
140 return res

Callers

nothing calls this directly

Calls 1

findMethod · 0.45

Tested by

no test coverage detected