diff --git a/markdown/treeprocessors.py b/markdown/treeprocessors.py index d06f19288..bb765724a 100644 --- a/markdown/treeprocessors.py +++ b/markdown/treeprocessors.py @@ -358,14 +358,14 @@ def run(self, root): self._prettifyETree(root) # Do
's seperately as they are often in the middle of # inline content and missed by _prettifyETree. - brs = root.getiterator('br') + brs = root.iter('br') for br in brs: if not br.tail or not br.tail.strip(): br.tail = '\n' else: br.tail = '\n%s' % br.tail # Clean up extra empty lines at end of code blocks. - pres = root.getiterator('pre') + pres = root.iter('pre') for pre in pres: if len(pre) and pre[0].tag == 'code': pre[0].text = util.AtomicString(pre[0].text.rstrip() + '\n')