diff options
author | Brandon Chinn <brandonchinn178@gmail.com> | 2016-09-29 12:25:20 -0700 |
---|---|---|
committer | Waylan Limberg <waylan.limberg@icloud.com> | 2016-09-29 15:25:20 -0400 |
commit | 1550bdbf954095182f5a5885e4e88bc1eff51b22 (patch) | |
tree | cda8dd697e9fecafa080581c70fdb4f67093bcb8 | |
parent | 6e15290aba4352451e432f2f1722a2ccb0088fee (diff) | |
download | markdown-1550bdbf954095182f5a5885e4e88bc1eff51b22.tar.gz markdown-1550bdbf954095182f5a5885e4e88bc1eff51b22.tar.bz2 markdown-1550bdbf954095182f5a5885e4e88bc1eff51b22.zip |
Replace `getiterator` function for Python 3.6
`getiterator` has been deprecated since Python 2.7, when `iter` was added.
Fixes #499.
-rw-r--r-- | markdown/treeprocessors.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/markdown/treeprocessors.py b/markdown/treeprocessors.py index d06f192..bb76572 100644 --- a/markdown/treeprocessors.py +++ b/markdown/treeprocessors.py @@ -358,14 +358,14 @@ class PrettifyTreeprocessor(Treeprocessor): self._prettifyETree(root) # Do <br />'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') |