aboutsummaryrefslogtreecommitdiffstats
path: root/markdown/treeprocessors.py
diff options
context:
space:
mode:
authorWaylan Limberg <waylan@dev.(none)>2009-10-21 16:32:57 -0400
committerWaylan Limberg <waylan@dev.(none)>2009-10-21 16:32:57 -0400
commitf271d1766a9672fa9f7bee6f89e7c41171b25698 (patch)
treec8534d7e135cf9eea12077863e415fa2b59d807f /markdown/treeprocessors.py
parent5d82c0a97628f42e08821bf10745ff3faefe4289 (diff)
downloadmarkdown-f271d1766a9672fa9f7bee6f89e7c41171b25698.tar.gz
markdown-f271d1766a9672fa9f7bee6f89e7c41171b25698.tar.bz2
markdown-f271d1766a9672fa9f7bee6f89e7c41171b25698.zip
The ENABLE_ATTRIBUTES global setting is now ackowledged.
Diffstat (limited to 'markdown/treeprocessors.py')
-rw-r--r--markdown/treeprocessors.py35
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