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

Method finder

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

Source from the content-addressed store, hash-verified

159 ) -> tuple[etree.Element, etree.Element, bool] | None:
160 """ Return ElementTree Element that contains Footnote placeholder. """
161 def finder(element):
162 for child in element:
163 if child.text:
164 if child.text.find(self.getConfig("PLACE_MARKER")) > -1:
165 return child, element, True
166 if child.tail:
167 if child.tail.find(self.getConfig("PLACE_MARKER")) > -1:
168 return child, element, False
169 child_res = finder(child)
170 if child_res is not None:
171 return child_res
172 return None
173
174 res = finder(root)
175 return res

Callers

nothing calls this directly

Calls 1

getConfigMethod · 0.80

Tested by

no test coverage detected