From cb90501d9be3e39e7ea286221d1c1e9dec17c612 Mon Sep 17 00:00:00 2001 From: Artem Yunusov Date: Fri, 22 Aug 2008 01:13:48 +0500 Subject: Empty line bug. --- markdown.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/markdown.py b/markdown.py index dec3e86..6645b27 100755 --- a/markdown.py +++ b/markdown.py @@ -1927,11 +1927,7 @@ class Markdown: Returns: ElementTree object. """ - if source is not None: #Allow blank string - self.source = source - - if not self.source: - return u"" + try: self.source = unicode(self.source) @@ -1966,6 +1962,12 @@ class Markdown: Returns: A serialized XHTML body. """ + + if source is not None: #Allow blank string + self.source = source + + if not self.source: + return u"" tree = self.markdownToTree(source) -- cgit v1.2.3