aboutsummaryrefslogtreecommitdiffstats
path: root/markdown.py
diff options
context:
space:
mode:
authorArtem Yunusov <nedrlab@gmail.com>2008-08-22 01:13:48 +0500
committerArtem Yunusov <nedrlab@gmail.com>2008-08-22 01:13:48 +0500
commitcb90501d9be3e39e7ea286221d1c1e9dec17c612 (patch)
treeda12ae2489ae5826f1789650129bda65d7087ea5 /markdown.py
parent15fe229e19f218eb99dfb09cc745705a9c2d1e97 (diff)
downloadmarkdown-cb90501d9be3e39e7ea286221d1c1e9dec17c612.tar.gz
markdown-cb90501d9be3e39e7ea286221d1c1e9dec17c612.tar.bz2
markdown-cb90501d9be3e39e7ea286221d1c1e9dec17c612.zip
Empty line bug.
Diffstat (limited to 'markdown.py')
-rwxr-xr-xmarkdown.py12
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)