Skip to content

Commit 35ba8db

Browse files
committed
some more cleanup
--HG-- extra : convert_revision : svn%3Aacbfec75-9323-0410-a652-858a13e371e0/trunk%40152
1 parent ab99c68 commit 35ba8db

1 file changed

Lines changed: 11 additions & 12 deletions

File tree

parser.py

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -698,10 +698,10 @@ def processCharacter(self, data):
698698
self.parser.openElements[-1].appendChild(TextNode(data))
699699

700700
def processStartTag(self, name, attributes):
701-
# XXX Should this handle unknown elements as well?
702701
handlers=utils.MethodDispatcher([
703702
("script",self.startTagScript),
704-
(("base", "link", "meta", "style", "title"), self.startTagFromHead),
703+
(("base", "link", "meta", "style", "title"),
704+
self.startTagFromHead),
705705
("body", self.startTagBody),
706706
(("address", "blockquote", "center", "dir", "div", "dl",
707707
"fieldset", "listing", "menu", "ol", "p", "pre", "ul"),
@@ -710,16 +710,16 @@ def processStartTag(self, name, attributes):
710710
(("li", "dd", "dt"), self.startTagListItem),
711711
("plaintext",self.startTagPlaintext),
712712
(headingElements, self.startTagHeading),
713-
("a",self.startTagA),
714-
(("b", "big", "em", "font", "i", "nobr", "s", "small",
715-
"strike", "strong", "tt", "u"),self.startTagFormatting),
713+
("a", self.startTagA),
714+
(("b", "big", "em", "font", "i", "nobr", "s", "small", "strike",
715+
"strong", "tt", "u"),self.startTagFormatting),
716716
("button", self.startTagButton),
717717
(("marquee", "object"), self.startTagMarqueeObject),
718-
("xmp", self.startTagXMP),
718+
("xmp", self.startTagXmp),
719719
("table", self.startTagTable),
720-
(("area", "basefont", "bgsound", "br", "embed", "img",
721-
"param", "spacer", "wbr"), self.startTagVoidFormatting),
722-
("hr", self.startTagHR),
720+
(("area", "basefont", "bgsound", "br", "embed", "img", "param",
721+
"spacer", "wbr"), self.startTagVoidFormatting),
722+
("hr", self.startTagHr),
723723
("image", self.startTagImage),
724724
("isindex", self.startTagIsIndex),
725725
("textarea", self.startTagTextarea),
@@ -971,8 +971,7 @@ def endTagButtonMarqueeObject(self, name):
971971
element = self.parser.openElements.pop()
972972
self.parser.clearActiveFormattingElements()
973973

974-
def startTagXMP(self, name, attributes):
975-
# XXX startTagXMP -> startTagXmp
974+
def startTagXmp(self, name, attributes):
976975
self.parser.reconstructActiveFormattingElements()
977976
self.parser.insertElement(name, attributes)
978977
self.tokenizer.contentModelFlag = contentModelFlags["CDATA"]
@@ -988,7 +987,7 @@ def startTagVoidFormatting(self, name, attributes):
988987
self.parser.insertElement(name, attributes)
989988
self.parser.openElements.pop()
990989

991-
def startTagHR(self, name, attributes):
990+
def startTagHr(self, name, attributes):
992991
self.endTagP("p")
993992
self.parser.insertElement(name, attributes)
994993
self.parser.openElements.pop()

0 commit comments

Comments
 (0)