Skip to content

Commit 97d4aed

Browse files
committed
change and remove some comments to reflect the implementation better
--HG-- extra : convert_revision : svn%3Aacbfec75-9323-0410-a652-858a13e371e0/trunk%40259
1 parent 03474d2 commit 97d4aed

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

parser.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1111,9 +1111,8 @@ def endTagHeading(self, name):
11111111
break
11121112

11131113
def endTagFormatting(self, name):
1114-
"""The much-feared adoption agency algorithm"""
1115-
# XXX I don't like while True + break... Too much possibility of
1116-
# infinite loops
1114+
"""The much-feared adoption agency algorithm
1115+
"""
11171116
while True:
11181117
# Step 1 paragraph 1
11191118
afeElement = self.parser.elementInActiveFormattingElements(name)
@@ -1133,7 +1132,7 @@ def endTagFormatting(self, name):
11331132
self.parser.parseError()
11341133

11351134
# Step 2
1136-
# XXX Start of the adoption agency algorithm proper
1135+
# Start of the adoption agency algorithm proper
11371136
afeIndex = self.parser.openElements.index(afeElement)
11381137
furthestBlock = None
11391138
for element in self.parser.openElements[afeIndex:]:
@@ -1279,7 +1278,6 @@ def endTagOther(self, name):
12791278

12801279
class InTable(InsertionMode):
12811280
# http://www.whatwg.org/specs/web-apps/current-work/#in-table
1282-
# XXX Need some idea of how to address the "anything else" case here...
12831281

12841282
# helper methods
12851283
def clearStackToTableContext(self):
@@ -1290,7 +1288,6 @@ def clearStackToTableContext(self):
12901288
# When the current node is <html> it's an innerHTML case
12911289

12921290
# processing methods
1293-
# processComment is handled by InsertionMode
12941291
def processNonSpaceCharacter(self, data):
12951292
self.parser.parseError()
12961293
# Make all the special element rearranging voodoo kick in
@@ -1741,7 +1738,6 @@ class InSelect(InsertionMode):
17411738
# http://www.whatwg.org/specs/web-apps/current-work/#in-select
17421739

17431740
# No need for processComment.
1744-
# XXX character token ... always appended to the current node
17451741
def processNonSpaceCharacter(self, data):
17461742
self.parser.insertText(data)
17471743

0 commit comments

Comments
 (0)