'Recursively find all footnote definitions in lines.
Keywords:
* lines: A list of lines of text
Return: A list of lines with footnote definitions removed.'

def _handleFootnoteDefinitions(self, lines):

    (i, id, footnote) = self._findFootnoteDefinition(lines)
    if id:
        plain = lines[:i]
        (detabbed, theRest) = self.detectTabbed(lines[(i + 1):])
        self.footnotes.setFootnote(id, ((footnote + '\n') + '\n'.join(detabbed)))
        more_plain = self._handleFootnoteDefinitions(theRest)
        return ((plain + ['']) + more_plain)
    else:
        return lines
