| 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 |