| 124 | def findFootnotesPlaceholder(self, root): |
| 125 | """ Return ElementTree Element that contains Footnote placeholder. """ |
| 126 | def finder(element): |
| 127 | for child in element: |
| 128 | if child.text: |
| 129 | if child.text.find(self.getConfig("PLACE_MARKER")) > -1: |
| 130 | return child, element, True |
| 131 | if child.tail: |
| 132 | if child.tail.find(self.getConfig("PLACE_MARKER")) > -1: |
| 133 | return child, element, False |
| 134 | child_res = finder(child) |
| 135 | if child_res is not None: |
| 136 | return child_res |
| 137 | return None |
| 138 | |
| 139 | res = finder(root) |
| 140 | return res |