aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCatalin Iacob <iacobcatalin@gmail.com>2012-04-16 20:42:47 +0200
committerCatalin Iacob <iacobcatalin@gmail.com>2012-04-16 20:42:47 +0200
commit5236a9838c580a17c3299efb97d9f41ce2a1efab (patch)
tree284c4704cc10dff5d745480eb294f042b76e8a1a
parent81a25ffbe1f11377ccb76e3085059805972ab8a5 (diff)
downloadmarkdown-5236a9838c580a17c3299efb97d9f41ce2a1efab.tar.gz
markdown-5236a9838c580a17c3299efb97d9f41ce2a1efab.tar.bz2
markdown-5236a9838c580a17c3299efb97d9f41ce2a1efab.zip
Fixed #87
Elements should be inserted in the tree regardless of enable_attributes
-rw-r--r--markdown/treeprocessors.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/markdown/treeprocessors.py b/markdown/treeprocessors.py
index 3340554..841fe0a 100644
--- a/markdown/treeprocessors.py
+++ b/markdown/treeprocessors.py
@@ -304,14 +304,15 @@ class InlineProcessor(Treeprocessor):
if child.getchildren():
stack.append(child)
- if self.markdown.enable_attributes:
- for element, lst in insertQueue:
+ for element, lst in insertQueue:
+ if self.markdown.enable_attributes:
if element.text:
element.text = \
inlinepatterns.handleAttributes(element.text,
element)
- i = 0
- for newChild in lst:
+ i = 0
+ for newChild in lst:
+ if self.markdown.enable_attributes:
# Processing attributes
if newChild.tail:
newChild.tail = \
@@ -321,8 +322,8 @@ class InlineProcessor(Treeprocessor):
newChild.text = \
inlinepatterns.handleAttributes(newChild.text,
newChild)
- element.insert(i, newChild)
- i += 1
+ element.insert(i, newChild)
+ i += 1
return tree