From 41f4e32e758ab3642b5e110db220f6a0f24b2ba4 Mon Sep 17 00:00:00 2001 From: Waylan Limberg Date: Fri, 22 Aug 2008 09:50:14 -0400 Subject: 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. --- markdown.py | 7 ++----- 1 file 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"" -- cgit v1.2.3