Skip to content

Commit a507b14

Browse files
committed
some whitespace changes and fixing an actual bug
--HG-- extra : convert_revision : svn%3Aacbfec75-9323-0410-a652-858a13e371e0/trunk%40154
1 parent eaf8892 commit a507b14

1 file changed

Lines changed: 11 additions & 6 deletions

File tree

parser.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -692,6 +692,9 @@ def anythingElse(self):
692692

693693

694694
class InBody(InsertionMode):
695+
# http://www.whatwg.org/specs/web-apps/current-work/#in-body
696+
# the crazy phase
697+
695698
# helper
696699
def addFormattingElement(self, name, attributes):
697700
self.parser.insertElement(name, attributes)
@@ -741,16 +744,18 @@ def processStartTag(self, name, attributes):
741744
handlers[name](name, attributes)
742745

743746
def startTagScript(self, name, attributes):
744-
self.parser.phase.insertionModes["inHead"](self.parser).processStartTag(name,
745-
attributes)
747+
self.parser.phase.insertionModes["inHead"](self.parser).\
748+
processStartTag(name, attributes)
746749

747750
def startTagFromHead(self, name, attributes):
748751
self.parser.parseError()
749-
self.parser.phase.insertionModes["inHead"](self.parser).processStartTag(name,
750-
attributes)
752+
self.parser.phase.insertionModes["inHead"](self.parser).\
753+
processStartTag(name, attributes)
754+
751755
def startTagBody(self, name, attributes):
752756
self.parser.parseError()
753-
if len(self.parser.openElements)==1 or self.parser.openElements[1].name != "body":
757+
if len(self.parser.openElements) == 1 \
758+
or self.parser.openElements[1].name != "body":
754759
assert self.parser.innerHTML
755760
else:
756761
for attr, value in attributes.iteritems():
@@ -810,7 +815,7 @@ def startTagA(self, name, attributes):
810815
afeAElement = self.parser.elementInActiveFormattingElements("a")
811816
if afeAElement:
812817
self.parser.parseError()
813-
self.endTagA("a")
818+
self.endTagFormatting("a")
814819
if afeAElement in self.parser.openElements:
815820
self.parser.openElements.remove(afeAElement)
816821
if afeAElement in self.parser.activeFormattingElements:

0 commit comments

Comments
 (0)