diff options
Diffstat (limited to 'markdown.py')
-rw-r--r-- | markdown.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/markdown.py b/markdown.py index dee572e..37b9b13 100644 --- a/markdown.py +++ b/markdown.py @@ -566,7 +566,11 @@ class HtmlBlockPreprocessor (Preprocessor): new_blocks.append( self.stash.store('\n\n'.join(items))) items = [] - + + if items : + new_blocks.append(self.stash.store('\n\n'.join(items))) + new_blocks.append('\n') + return "\n\n".join(new_blocks).split("\n") HTML_BLOCK_PREPROCESSOR = HtmlBlockPreprocessor() @@ -1599,6 +1603,9 @@ class Markdown: if source : self.source = source + if not self.source : + return "" + self.source = removeBOM(self.source, self.encoding) |