diff options
Diffstat (limited to 'markdown')
-rw-r--r-- | markdown/treeprocessors.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/markdown/treeprocessors.py b/markdown/treeprocessors.py index 0c5a99a..d2af0dc 100644 --- a/markdown/treeprocessors.py +++ b/markdown/treeprocessors.py @@ -14,7 +14,9 @@ def build_treeprocessors(md_instance, **kwargs): def isString(s): """ Check if it's string """ - return isinstance(s, unicode) or isinstance(s, str) + if not isinstance(s, util.AtomicString): + return isinstance(s, basestring) + return False class Processor: @@ -204,6 +206,9 @@ class InlineProcessor(Treeprocessor): strartIndex = end else: text = data[strartIndex:] + if isinstance(data, util.AtomicString): + # We don't want to loose the AtomicString + text = util.AtomicString(text) linkText(text) data = "" |