Skip to content

Commit 89a3c5a

Browse files
committed
Support <main>.
1 parent e6ab4c9 commit 89a3c5a

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

html5lib/html5parser.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -886,7 +886,7 @@ def __init__(self, parser, tree):
886886
("frameset", self.startTagFrameset),
887887
(("address", "article", "aside", "blockquote", "center", "details",
888888
"details", "dir", "div", "dl", "fieldset", "figcaption", "figure",
889-
"footer", "header", "hgroup", "menu", "nav", "ol", "p",
889+
"footer", "header", "hgroup", "main", "menu", "nav", "ol", "p",
890890
"section", "summary", "ul"),
891891
self.startTagCloseP),
892892
(headingElements, self.startTagHeading),
@@ -928,8 +928,8 @@ def __init__(self, parser, tree):
928928
("html", self.endTagHtml),
929929
(("address", "article", "aside", "blockquote", "center",
930930
"details", "dir", "div", "dl", "fieldset", "figcaption", "figure",
931-
"footer", "header", "hgroup", "listing", "menu", "nav", "ol", "pre",
932-
"section", "summary", "ul"), self.endTagBlock),
931+
"footer", "header", "hgroup", "listing", "main", "menu", "nav", "ol",
932+
"pre", "section", "summary", "ul"), self.endTagBlock),
933933
("form", self.endTagForm),
934934
("p", self.endTagP),
935935
(("dd", "dt", "li"), self.endTagListItem),

html5lib/tests/test_parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def test_parser():
7979

8080
for filename in files:
8181
testName = os.path.basename(filename).replace(".dat", "")
82-
if testName in ("main-element", "template"):
82+
if testName in ("template",):
8383
continue
8484

8585
tests = TestData(filename, "data")

html5lib/tests/test_treewalkers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ def test_treewalker():
300300
files = get_data_files('tree-construction')
301301
for filename in files:
302302
testName = os.path.basename(filename).replace(".dat", "")
303-
if testName in ("main-element", "template"):
303+
if testName in ("template",):
304304
continue
305305

306306
tests = TestData(filename, "data")

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy