diff options
author | Waylan Limberg <waylan@dev.(none)> | 2009-10-21 16:32:57 -0400 |
---|---|---|
committer | Waylan Limberg <waylan@dev.(none)> | 2009-10-21 16:32:57 -0400 |
commit | f271d1766a9672fa9f7bee6f89e7c41171b25698 (patch) | |
tree | c8534d7e135cf9eea12077863e415fa2b59d807f | |
parent | 5d82c0a97628f42e08821bf10745ff3faefe4289 (diff) | |
download | markdown-f271d1766a9672fa9f7bee6f89e7c41171b25698.tar.gz markdown-f271d1766a9672fa9f7bee6f89e7c41171b25698.tar.bz2 markdown-f271d1766a9672fa9f7bee6f89e7c41171b25698.zip |
The ENABLE_ATTRIBUTES global setting is now ackowledged.
-rw-r--r-- | markdown/treeprocessors.py | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/markdown/treeprocessors.py b/markdown/treeprocessors.py index 1dc612a..ca3b02b 100644 --- a/markdown/treeprocessors.py +++ b/markdown/treeprocessors.py @@ -275,24 +275,25 @@ class InlineProcessor(Treeprocessor): if child.getchildren(): stack.append(child) - for element, lst in insertQueue: - if element.text: - element.text = \ - markdown.inlinepatterns.handleAttributes(element.text, - element) - i = 0 - for newChild in lst: - # Processing attributes - if newChild.tail: - newChild.tail = \ - markdown.inlinepatterns.handleAttributes(newChild.tail, + if markdown.ENABLE_ATTRIBUTES: + for element, lst in insertQueue: + if element.text: + element.text = \ + markdown.inlinepatterns.handleAttributes(element.text, element) - if newChild.text: - newChild.text = \ - markdown.inlinepatterns.handleAttributes(newChild.text, - newChild) - element.insert(i, newChild) - i += 1 + i = 0 + for newChild in lst: + # Processing attributes + if newChild.tail: + newChild.tail = \ + markdown.inlinepatterns.handleAttributes(newChild.tail, + element) + if newChild.text: + newChild.text = \ + markdown.inlinepatterns.handleAttributes(newChild.text, + newChild) + element.insert(i, newChild) + i += 1 return tree |