Skip to content

Commit 044c0f2

Browse files
committed
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.
1 parent 82ad7a9 commit 044c0f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

markdown/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ def build_extension(self, ext_name, configs):
234234
)
235235
# For backward compat (until deprecation)
236236
# check that this is an extension.
237-
if ('.' not in ext_name and not (hasattr(module, 'extendMarkdown')
237+
if ('.' not in ext_name and not (hasattr(module, 'makeExtension')
238238
or (class_name and hasattr(module, class_name)))):
239239
# We have a name conflict
240240
# eg: extensions=['tables'] and PyTables is installed

0 commit comments

Comments
 (0)