MCPcopy
hub / github.com/Python-Markdown/markdown / finder

Method finder

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

Source from the content-addressed store, hash-verified

147 ) -> tuple[etree.Element, etree.Element, bool] | None:
148 """ Return ElementTree Element that contains Footnote placeholder. """
149 def finder(element):
150 for child in element:
151 if child.text:
152 if child.text.find(self.getConfig("PLACE_MARKER")) > -1:
153 return child, element, True
154 if child.tail:
155 if child.tail.find(self.getConfig("PLACE_MARKER")) > -1:
156 return child, element, False
157 child_res = finder(child)
158 if child_res is not None:
159 return child_res
160 return None
161
162 res = finder(root)
163 return res

Callers

nothing calls this directly

Calls 1

getConfigMethod · 0.80

Tested by

no test coverage detected