diff options
Diffstat (limited to 'markdown/treeprocessors.py')
-rw-r--r-- | markdown/treeprocessors.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/markdown/treeprocessors.py b/markdown/treeprocessors.py index a475fde..f634ff5 100644 --- a/markdown/treeprocessors.py +++ b/markdown/treeprocessors.py @@ -432,5 +432,5 @@ class PrettifyTreeprocessor(Treeprocessor): # Clean up extra empty lines at end of code blocks. pres = root.iter('pre') for pre in pres: - if len(pre) and pre[0].tag == 'code': + if len(pre) and pre[0].tag == 'code' and pre[0].text is not None: pre[0].text = util.AtomicString(pre[0].text.rstrip() + '\n') |