From 231b7784e66edf8a5fb26ccfd363a82ab2dcc7e2 Mon Sep 17 00:00:00 2001 From: David Wolever Date: Tue, 26 Feb 2008 18:29:46 +0000 Subject: Removed the rigorous type-checking when loading extensions. If it walks like a duck... --- markdown.py | 6 ++++-- 1 file 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))) -- cgit v1.2.3