def _prettifyETree(self, elem):
    ' Recursively add linebreaks to ElementTree children. '
    i = '\n'
    if (util.isBlockLevel(elem.tag) and (elem.tag not in ['code', 'pre'])):
        if (((not elem.text) or (not elem.text.strip())) and len(elem) and util.isBlockLevel(elem[0].tag)):
            elem.text = i
        for e in elem:
            if util.isBlockLevel(e.tag):
                self._prettifyETree(e)
        if ((not elem.tail) or (not elem.tail.strip())):
            elem.tail = i
    if ((not elem.tail) or (not elem.tail.strip())):
        elem.tail = i
Recursively add linebreaks to ElementTree children.
def _prettifyETree(self, elem):
    '  '
    i = '\n'
    if (util.isBlockLevel(elem.tag) and (elem.tag not in ['code', 'pre'])):
        if (((not elem.text) or (not elem.text.strip())) and len(elem) and util.isBlockLevel(elem[0].tag)):
            elem.text = i
        for e in elem:
            if util.isBlockLevel(e.tag):
                self._prettifyETree(e)
        if ((not elem.tail) or (not elem.tail.strip())):
            elem.tail = i
    if ((not elem.tail) or (not elem.tail.strip())):
        elem.tail = i