diff options
author | Waylan Limberg <waylan@gmail.com> | 2013-08-07 22:17:30 -0400 |
---|---|---|
committer | Waylan Limberg <waylan@gmail.com> | 2013-08-07 22:17:30 -0400 |
commit | d12d2c95b42c5fc0910b13859001755d71ad3438 (patch) | |
tree | 6f62507415a7c86e71985d07945d89f98607ccca /markdown/__init__.py | |
parent | a64592d5f288d0b83b11aa7d4eade728d5d5fb91 (diff) | |
download | markdown-d12d2c95b42c5fc0910b13859001755d71ad3438.tar.gz markdown-d12d2c95b42c5fc0910b13859001755d71ad3438.tar.bz2 markdown-d12d2c95b42c5fc0910b13859001755d71ad3438.zip |
Allow extensions to register serializers
Setting output_format must happen after extensions are loaded. Only in that
way can an extension register a serializer so that it will then be available
to be used with the output_format keyword. A test has been added to avoid
this regression from happening again in the future.
Fixes #238, partially reverses commit 41cc055 and provides a better fix for
Diffstat (limited to 'markdown/__init__.py')
-rw-r--r-- | markdown/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/markdown/__init__.py b/markdown/__init__.py index 3fd5efa..275ed2e 100644 --- a/markdown/__init__.py +++ b/markdown/__init__.py @@ -133,9 +133,9 @@ class Markdown(object): self.references = {} self.htmlStash = util.HtmlStash() - self.set_output_format(kwargs.get('output_format', 'xhtml1')) self.registerExtensions(extensions=kwargs.get('extensions', []), configs=kwargs.get('extension_configs', {})) + self.set_output_format(kwargs.get('output_format', 'xhtml1')) self.reset() def build_parser(self): |