From 87f03a3c00c4b8cb86db4cfa9a7833b503952cb0 Mon Sep 17 00:00:00 2001 From: Waylan Limberg Date: Thu, 21 Jul 2011 10:45:26 -0400 Subject: Fixed the bug exposed in 8761cd1780a7cec60123. We no longer should get empty rawhtml blocks. All tests pass again. --- markdown/preprocessors.py | 5 +++-- 1 file 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))) -- cgit v1.2.3