aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWaylan Limberg <waylan@gmail.com>2008-08-22 09:50:14 -0400
committerWaylan Limberg <waylan@gmail.com>2008-08-22 09:50:14 -0400
commit41f4e32e758ab3642b5e110db220f6a0f24b2ba4 (patch)
tree42e4ede56b3ce5ee3478108e40c39c39a79f91aa
parentcb90501d9be3e39e7ea286221d1c1e9dec17c612 (diff)
downloadmarkdown-41f4e32e758ab3642b5e110db220f6a0f24b2ba4.tar.gz
markdown-41f4e32e758ab3642b5e110db220f6a0f24b2ba4.tar.bz2
markdown-41f4e32e758ab3642b5e110db220f6a0f24b2ba4.zip
As Markdown.__init__ no longer accepts a 'source' keyword, we no longer need to ensure that the 'source' kerword of Markdown.convert does not override it when set to 'None'. Now that Markdown.convert is the only place 'source' should be set, we can assume we always use it. And while we're at it, we might as well make 'source' a required argument.
-rwxr-xr-xmarkdown.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/markdown.py b/markdown.py
index 6645b27..a835627 100755
--- a/markdown.py
+++ b/markdown.py
@@ -1951,7 +1951,7 @@ class Markdown:
return markdownTree
- def convert (self, source=None):
+ def convert (self, source):
"""
Create the document in XHTML format.
@@ -1962,10 +1962,7 @@ class Markdown:
Returns: A serialized XHTML body.
"""
-
- if source is not None: #Allow blank string
- self.source = source
-
+ self.source = source
if not self.source:
return u""