diff options
-rw-r--r-- | markdown/treeprocessors.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/markdown/treeprocessors.py b/markdown/treeprocessors.py index 2df80f8..e6d3dc9 100644 --- a/markdown/treeprocessors.py +++ b/markdown/treeprocessors.py @@ -301,7 +301,7 @@ class InlineProcessor(Treeprocessor): for element, lst in insertQueue: if self.markdown.enable_attributes: - if element.text: + if element.text and isString(element.text): element.text = \ inlinepatterns.handleAttributes(element.text, element) @@ -309,11 +309,11 @@ class InlineProcessor(Treeprocessor): for newChild in lst: if self.markdown.enable_attributes: # Processing attributes - if newChild.tail: + if newChild.tail and isString(newChild.tail): newChild.tail = \ inlinepatterns.handleAttributes(newChild.tail, element) - if newChild.text: + if newChild.text and isString(newChild.text): newChild.text = \ inlinepatterns.handleAttributes(newChild.text, newChild) |