Skip to content

Commit ab99c68

Browse files
committed
fix a bug in the activeformatting algorithm
--HG-- extra : convert_revision : svn%3Aacbfec75-9323-0410-a652-858a13e371e0/trunk%40151
1 parent 0ba4253 commit ab99c68

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

parser.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,10 +222,12 @@ def elementInActiveFormattingElements(self, name):
222222
return false"""
223223

224224
for item in self.activeFormattingElements[::-1]:
225-
if item.name == name:
226-
return item
227-
elif item == Marker:
225+
# Check for Marker first because if it's a Marker it doesn't have a
226+
# name attribute.
227+
if item == Marker:
228228
break
229+
elif item.name == name:
230+
return item
229231
return False
230232

231233
def createElement(self, name, attributes):

0 commit comments

Comments
 (0)