Skip to content

Commit

Permalink
Fix back-compat import of ext names without dots.
Browse files Browse the repository at this point in the history
`makeExtension` is the module level function defined in an extension,
not `extendMarkdown`, which is the method you override on the Extension class.
Do'h. Thanks for catching this @mitya57.
  • Loading branch information
waylan committed Feb 2, 2015
1 parent 82ad7a9 commit 044c0f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion markdown/__init__.py
Expand Up @@ -234,7 +234,7 @@ def build_extension(self, ext_name, configs):
)
# For backward compat (until deprecation)
# check that this is an extension.
if ('.' not in ext_name and not (hasattr(module, 'extendMarkdown')
if ('.' not in ext_name and not (hasattr(module, 'makeExtension')
or (class_name and hasattr(module, class_name)))):
# We have a name conflict
# eg: extensions=['tables'] and PyTables is installed
Expand Down

0 comments on commit 044c0f2

Please sign in to comment.