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

Method finder

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

Source from the content-addressed store, hash-verified

166 ) -> tuple[etree.Element, etree.Element, bool] | None:
167 """ Return ElementTree Element that contains Footnote placeholder. """
168 def finder(element):
169 for child in element:
170 if child.text:
171 if child.text.find(self.getConfig("PLACE_MARKER")) > -1:
172 return child, element, True
173 if child.tail:
174 if child.tail.find(self.getConfig("PLACE_MARKER")) > -1:
175 return child, element, False
176 child_res = finder(child)
177 if child_res is not None:
178 return child_res
179 return None
180
181 res = finder(root)
182 return res

Callers

nothing calls this directly

Calls 1

getConfigMethod · 0.80

Tested by

no test coverage detected