diff options
author | Waylan Limberg <waylan@gmail.com> | 2010-11-04 20:51:24 -0400 |
---|---|---|
committer | Waylan Limberg <waylan@gmail.com> | 2010-11-04 20:51:24 -0400 |
commit | b32cba5558d964f3445f20bdd44af8ed1cc2df83 (patch) | |
tree | 832a7616aad64dfa275a99f330cdca15597c9285 /markdown/treeprocessors.py | |
parent | 0fd4a148d942b9056734a6f72201a95da5ca0c05 (diff) | |
download | markdown-b32cba5558d964f3445f20bdd44af8ed1cc2df83.tar.gz markdown-b32cba5558d964f3445f20bdd44af8ed1cc2df83.tar.bz2 markdown-b32cba5558d964f3445f20bdd44af8ed1cc2df83.zip |
Fixed Ticket 74. AtomicStrings should now be ackowledged (and preserved) in all instances. This was a real pain to debug, but an easy fix once I found it. Thanks to obs for the report.
Diffstat (limited to 'markdown/treeprocessors.py')
-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 = "" |