diff options
author | Artem Yunusov <nedrlab@gmail.com> | 2008-08-22 01:13:48 +0500 |
---|---|---|
committer | Artem Yunusov <nedrlab@gmail.com> | 2008-08-22 01:13:48 +0500 |
commit | cb90501d9be3e39e7ea286221d1c1e9dec17c612 (patch) | |
tree | da12ae2489ae5826f1789650129bda65d7087ea5 /markdown.py | |
parent | 15fe229e19f218eb99dfb09cc745705a9c2d1e97 (diff) | |
download | markdown-cb90501d9be3e39e7ea286221d1c1e9dec17c612.tar.gz markdown-cb90501d9be3e39e7ea286221d1c1e9dec17c612.tar.bz2 markdown-cb90501d9be3e39e7ea286221d1c1e9dec17c612.zip |
Empty line bug.
Diffstat (limited to 'markdown.py')
-rwxr-xr-x | markdown.py | 12 |
1 files 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) |