aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWaylan Limberg <waylan@gmail.com>2011-07-21 10:45:26 -0400
committerWaylan Limberg <waylan@gmail.com>2011-07-21 10:45:26 -0400
commit87f03a3c00c4b8cb86db4cfa9a7833b503952cb0 (patch)
tree5030899604be1bfb16d09c82a2b9bce075307a92
parent9927620f789ffc33082e631e532e9ca21eb15fc7 (diff)
downloadmarkdown-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.py5
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)))