'Recursively add linebreaks to ElementTree children.'

def _prettifyETree(self, elem):

    i = u'\n'
    if (util.isBlockLevel(elem.tag) and (elem.tag not in [u'code', u'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
