Skip to content

Commit 4e9fcef

Browse files
Add DOCTYPE errors (and remove one)
A DOCTYPE token is an error in one of three cases: 1. The token's name is not `html`; 2. The token's public identifier is not missing; 3. The token's system identifier is not missing and the token's system identifier isn't `about:legacy-compat`. This appears to have changed at some point from a much more complex set of conditions.
1 parent 0b3ff9a commit 4e9fcef

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tree-construction/doctype01.dat

+5-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
#data
3535
<!DOCTYPE>Hello
3636
#errors
37-
(1,9): need-space-after-doctype
3837
(1,10): expected-doctype-name-but-got-right-bracket
3938
(1,10): unknown-doctype
4039
#new-errors
@@ -337,6 +336,7 @@
337336
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
338337
"http://www.w3.org/TR/html4/strict.dtd">Hello
339338
#errors
339+
(2,43): unknown-doctype
340340
#document
341341
| <!DOCTYPE html "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
342342
| <html>
@@ -421,6 +421,7 @@
421421
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
422422
#errors
423423
(1,50): unexpected-char-in-doctype
424+
(1,89): unknown-doctype
424425
#new-errors
425426
(1:50) missing-whitespace-between-doctype-public-and-system-identifiers
426427
#document
@@ -433,6 +434,7 @@
433434
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"'http://www.w3.org/TR/html4/strict.dtd'>
434435
#errors
435436
(1,50): unexpected-char-in-doctype
437+
(1,89): unknown-doctype
436438
#new-errors
437439
(1:50) missing-whitespace-between-doctype-public-and-system-identifiers
438440
#document
@@ -446,6 +448,7 @@
446448
#errors
447449
(1,21): unexpected-char-in-doctype
448450
(1,49): unexpected-char-in-doctype
451+
(1,88): unknown-doctype
449452
#new-errors
450453
(1:22) missing-whitespace-after-doctype-public-keyword
451454
(1:49) missing-whitespace-between-doctype-public-and-system-identifiers
@@ -460,6 +463,7 @@
460463
#errors
461464
(1,21): unexpected-char-in-doctype
462465
(1,49): unexpected-char-in-doctype
466+
(1,88): unknown-doctype
463467
#new-errors
464468
(1:22) missing-whitespace-after-doctype-public-keyword
465469
(1:49) missing-whitespace-between-doctype-public-and-system-identifiers

0 commit comments

Comments
 (0)