'Parse a markdown document into an ElementTree.
Given a list of lines, an ElementTree object (not just a parent Element)
is created and the root element is passed to the parser as the parent.
The ElementTree object is returned.
This should only be called on an entire document, not pieces.'

def parseDocument(self, lines):

    self.root = markdown.etree.Element(markdown.DOC_TAG)
    self.parseChunk(self.root, '\n'.join(lines))
    return markdown.etree.ElementTree(self.root)
