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