(self, root)
return res
Return ElementTree Element that contains Footnote placeholder.
Return ElementTree Element that contains Footnote placeholder.
Return ElementTree Element that contains Footnote placeholder .
def findFootnotesPlaceholder(self, root):
        """ Return ElementTree Element that contains Footnote placeholder. """
        def finder(element):
            for child in element:
                if child.text:
                    if child.text.find(self.getConfig("PLACE_MARKER")) > -1:
                        return child, element, True
                if child.tail:
                    if child.tail.find(self.getConfig("PLACE_MARKER")) > -1:
                        return child, element, False
                finder(child)
            return None
                
        res = finder(root)
        return res
def findFootnotesPlaceholder ( self , root ) : def finder ( element ) : for child in element : if child . text : if child . text . find ( self . getConfig ( "PLACE_MARKER" ) ) > - 1 : return child , element , True if child . tail : if child . tail . find ( self . getConfig ( "PLACE_MARKER" ) ) > - 1 : return child , element , False finder ( child ) return None res = finder ( root ) return res