From 044c0f2f61c2e289c1e231260a97b770794c8a2d Mon Sep 17 00:00:00 2001 From: Waylan Limberg Date: Mon, 2 Feb 2015 17:59:19 -0500 Subject: Fix back-compat import of ext names without dots. `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. --- markdown/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/markdown/__init__.py b/markdown/__init__.py index fc51288..9aa3432 100644 --- a/markdown/__init__.py +++ b/markdown/__init__.py @@ -234,7 +234,7 @@ class Markdown(object): ) # 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 -- cgit v1.2.3