aboutsummaryrefslogtreecommitdiffstats
path: root/markdown.py
diff options
context:
space:
mode:
authorDavid Wolever <wolever@cs.toronto.edu>2008-02-26 18:29:46 +0000
committerDavid Wolever <wolever@cs.toronto.edu>2008-02-26 18:29:46 +0000
commit231b7784e66edf8a5fb26ccfd363a82ab2dcc7e2 (patch)
tree940e092aedcc61d10d4c361ed87435516dbbfb0e /markdown.py
parent68bb13a36fe68c9d1ecdcf21c4dc8d92e7b962d8 (diff)
downloadmarkdown-231b7784e66edf8a5fb26ccfd363a82ab2dcc7e2.tar.gz
markdown-231b7784e66edf8a5fb26ccfd363a82ab2dcc7e2.tar.bz2
markdown-231b7784e66edf8a5fb26ccfd363a82ab2dcc7e2.zip
Removed the rigorous type-checking when loading extensions. If it walks like a duck...
Diffstat (limited to 'markdown.py')
-rw-r--r--markdown.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/markdown.py b/markdown.py
index 709ed50..1681a98 100644
--- a/markdown.py
+++ b/markdown.py
@@ -1235,8 +1235,10 @@ class Markdown:
for ext in extensions:
if isinstance(ext, basestring):
ext = load_extension(ext, configs.get(ext, []))
- elif isinstance(ext, Extension):
- pass # nothing to do here
+ elif hasattr(ext, 'extendMarkdown'):
+ # Looks like an Extension.
+ # Nothing to do here.
+ pass
else:
message(ERROR, "Incorrect type! Extension '%s' is "
"neither a string or an Extension." %(repr(ext)))