8000 Deal with new elements under the other case 'till Hixie fixes the spec · awesome-python/html5lib-python@62b4e91 · GitHub
[go: up one dir, main page]

Skip to content

Commit 62b4e91

Browse files
committed
Deal with new elements under the other case 'till Hixie fixes the spec
--HG-- extra : convert_revision : svn%3Aacbfec75-9323-0410-a652-858a13e371e0/trunk%40552
1 parent fc9b124 commit 62b4e91

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/html5parser.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
from sets import ImmutableSet as frozenset
2121
import gettext
2222
_ = gettext.gettext
23+
import sys
2324

2425
import tokenizer
2526

@@ -861,11 +862,13 @@ def startTagMisplaced(self, name, attributes):
861862
self.parser.parseError(_(u"Unexpected start tag (" + name +\
862863
u"). Ignored."))
863864

864-
def startTagNew(self, name, other):
865+
def startTagNew(self, name, attributes):
865866
"""New HTML5 elements, "event-source", "section", "nav",
866867
"article", "aside", "header", "footer", "datagrid", "command"
867868
"""
868-
raise NotImplementedError
869+
sys.stderr.write("Warning: Undefined behaviour for tag %s"%name)
870+
self.startTagOther(name, attributes)
871+
#raise NotImplementedError
869872

870873
def startTagOther(self, name, attributes):
871874
self.tree.reconstructActiveFormattingElements()

0 commit comments

Comments
 (0)
0