diff options
author | Waylan Limberg <waylan@gmail.com> | 2011-07-21 10:45:26 -0400 |
---|---|---|
committer | Waylan Limberg <waylan@gmail.com> | 2011-07-21 10:45:26 -0400 |
commit | 87f03a3c00c4b8cb86db4cfa9a7833b503952cb0 (patch) | |
tree | 5030899604be1bfb16d09c82a2b9bce075307a92 | |
parent | 9927620f789ffc33082e631e532e9ca21eb15fc7 (diff) | |
download | markdown-87f03a3c00c4b8cb86db4cfa9a7833b503952cb0.tar.gz markdown-87f03a3c00c4b8cb86db4cfa9a7833b503952cb0.tar.bz2 markdown-87f03a3c00c4b8cb86db4cfa9a7833b503952cb0.zip |
Fixed the bug exposed in 8761cd1780a7cec60123. We no longer should get empty rawhtml blocks. All tests pass again.
-rw-r--r-- | markdown/preprocessors.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/markdown/preprocessors.py b/markdown/preprocessors.py index 2bd85b0..b59f057 100644 --- a/markdown/preprocessors.py +++ b/markdown/preprocessors.py @@ -237,8 +237,9 @@ class HtmlBlockPreprocessor(Preprocessor): new_blocks.append( self.markdown.htmlStash.store(start)) new_blocks.extend(items) - new_blocks.append( - self.markdown.htmlStash.store(end)) + if end.strip(): + new_blocks.append( + self.markdown.htmlStash.store(end)) else: new_blocks.append( self.markdown.htmlStash.store('\n\n'.join(items))) |