diff options
author | David Wolever <wolever@cs.toronto.edu> | 2008-02-26 18:29:46 +0000 |
---|---|---|
committer | David Wolever <wolever@cs.toronto.edu> | 2008-02-26 18:29:46 +0000 |
commit | 231b7784e66edf8a5fb26ccfd363a82ab2dcc7e2 (patch) | |
tree | 940e092aedcc61d10d4c361ed87435516dbbfb0e | |
parent | 68bb13a36fe68c9d1ecdcf21c4dc8d92e7b962d8 (diff) | |
download | markdown-231b7784e66edf8a5fb26ccfd363a82ab2dcc7e2.tar.gz markdown-231b7784e66edf8a5fb26ccfd363a82ab2dcc7e2.tar.bz2 markdown-231b7784e66edf8a5fb26ccfd363a82ab2dcc7e2.zip |
Removed the rigorous type-checking when loading extensions. If it walks like a duck...
-rw-r--r-- | markdown.py | 6 |
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))) |