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