diff options
-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))) |