Browse files

Fixed #87

Elements should be inserted in the tree regardless of enable_attributes
  • Loading branch information...
1 parent 81a25ff commit 5236a9838c580a17c3299efb97d9f41ce2a1efab @cataliniacob cataliniacob committed Apr 16, 2012
Showing with 7 additions and 6 deletions.
  1. +7 −6 markdown/treeprocessors.py
View
13 markdown/treeprocessors.py
@@ -304,14 +304,15 @@ def run(self, tree):
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 @@ def run(self, tree):
newChild.text = \
inlinepatterns.handleAttributes(newChild.text,
newChild)
- element.insert(i, newChild)
- i += 1
+ element.insert(i, newChild)
+ i += 1
return tree

0 comments on commit 5236a98

Please sign in to comment.