Skip to content

Commit 82047b0

Browse files
authored
Sort void elements alphabetically, document ones that don't match current standard (#563)
1 parent 6ca0244 commit 82047b0

File tree

1 file changed

+21
-9
lines changed

1 file changed

+21
-9
lines changed

html5lib/constants.py

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -557,24 +557,36 @@
557557
)
558558

559559
voidElements = frozenset([
560+
"area",
560561
"base",
561-
"command",
562-
"event-source",
563-
"link",
564-
"meta",
565-
"hr",
566562
"br",
567-
"img",
568-
"embed",
569-
"param",
570-
"area",
571563
"col",
564+
"command", # removed ^1
565+
"embed",
566+
"event-source", # renamed and later removed ^2
567+
"hr",
568+
"img",
572569
"input",
570+
"link",
571+
"meta",
572+
"param", # deprecated ^3
573573
"source",
574574
"track",
575575
"wbr",
576576
])
577577

578+
# Removals and deprecations in the HTML 5 spec:
579+
# ^1: command
580+
# http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2012-December/038472.html
581+
# https://github.com/whatwg/html/commit/9e2e25f4ae90969a7c64e0763c98548a35b50af8
582+
# ^2: event-source
583+
# renamed to eventsource in 7/2008:
584+
# https://github.com/whatwg/html/commit/d157945d0285b4463a04b57318da0c4b300a99e7
585+
# removed entirely in 2/2009:
586+
# https://github.com/whatwg/html/commit/43cbdbfbb7eb74b0d65e0f4caab2020c0b2a16ff
587+
# ^3: param
588+
# https://developer.mozilla.org/en-US/docs/Web/HTML/Element/param
589+
578590
cdataElements = frozenset(['title', 'textarea'])
579591

580592
rcdataElements = frozenset([

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