Skip to content

Commit 7bb533c

Browse files
stevecheckowayjgraham
authored andcommitted
Add missing errors
Adds the other spec-mandated errors. When an error is caused by a tag, the line and column numbers are the line and column the tag starts in.
1 parent 3438ae3 commit 7bb533c

File tree

3 files changed

+47
-0
lines changed

3 files changed

+47
-0
lines changed

tree-construction/foreign-fragment.dat

+12
Original file line numberDiff line numberDiff line change
@@ -573,6 +573,8 @@ svg svg
573573
<svg></p><foo>
574574
#errors
575575
9: HTML end tag “p” in a foreign namespace context.
576+
(1:6) Unexpected </p> from in body insertion mode
577+
(1:15) Unexpected EOF
576578
#document-fragment
577579
div
578580
#document
@@ -584,6 +586,8 @@ div
584586
<svg></br><foo>
585587
#errors
586588
10: HTML end tag “br” in a foreign namespace context.
589+
(1:6) Unexpected </br> from in body insertion mode
590+
(1:16) Unexpected EOF
587591
#document-fragment
588592
div
589593
#document
@@ -595,6 +599,8 @@ div
595599
</p><foo>
596600
#errors
597601
4: HTML end tag “p” in a foreign namespace context.
602+
(1:1) Unexpected </p> from in body insertion mode
603+
(1:10) Unexpected EOF
598604
#document-fragment
599605
svg svg
600606
#document
@@ -605,6 +611,8 @@ svg svg
605611
</br><foo>
606612
#errors
607613
5: HTML end tag “br” in a foreign namespace context.
614+
(1:1) Unexpected </br> from in body insertion mode
615+
(1:11) Unexpected EOF
608616
#document-fragment
609617
svg svg
610618
#document
@@ -615,6 +623,8 @@ svg svg
615623
<body><foo>
616624
#errors
617625
6: HTML start tag “body” in a foreign namespace context.
626+
(1:1) Unexpected <body> from in body insertion mode
627+
(1:12) Unexpected EOF
618628
#document-fragment
619629
svg svg
620630
#document
@@ -624,6 +634,7 @@ svg svg
624634
<p><foo>
625635
#errors
626636
3: HTML start tag “p” in a foreign namespace context.
637+
(1:9) Unexpected EOF
627638
#document-fragment
628639
svg svg
629640
#document
@@ -634,6 +645,7 @@ svg svg
634645
<p></p><foo>
635646
#errors
636647
3: HTML start tag “p” in a foreign namespace context.
648+
(1:13) Unexpected EOF
637649
#document-fragment
638650
svg svg
639651
#document

tree-construction/svg.dat

+23
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#data
22
<svg><tr><td><title><tr>
33
#errors
4+
(1:21) Unexpected <tr> tag
5+
(1:25) Unexpected EOF
46
#document-fragment
57
td
68
#document
@@ -12,6 +14,9 @@ td
1214
#data
1315
<svg><tr><td><title><tr>
1416
#errors
17+
(1:1) Unexpected <svg> tag
18+
(1:21) Unexpected <tr> tag
19+
(1:25) Unexpected EOF
1520
#document-fragment
1621
tr
1722
#document
@@ -23,6 +28,9 @@ tr
2328
#data
2429
<svg><thead><title><tbody>
2530
#errors
31+
(1:1) Unexpected <svg> tag
32+
(1:20) Unexpected <tbody> tag
33+
(1:27) Unexpected EOF
2634
#document-fragment
2735
thead
2836
#document
@@ -33,6 +41,9 @@ thead
3341
#data
3442
<svg><tfoot><title><tbody>
3543
#errors
44+
(1:1) Unexpected <svg> tag
45+
(1:20) Unexpected <tbody> tag
46+
(1:27) Unexpected EOF
3647
#document-fragment
3748
tfoot
3849
#document
@@ -43,6 +54,9 @@ tfoot
4354
#data
4455
<svg><tbody><title><tfoot>
4556
#errors
57+
(1:1) Unexpected <svg> tag
58+
(1:20) Unexpected <tfoot> tag
59+
(1:27) Unexpected EOF
4660
#document-fragment
4761
tbody
4862
#document
@@ -53,6 +67,9 @@ tbody
5367
#data
5468
<svg><tbody><title></table>
5569
#errors
70+
(1:1) Unexpected <svg> tag
71+
(1:20) Unexpected </table> tag
72+
(1:28) Unexpected EOF
5673
#document-fragment
5774
tbody
5875
#document
@@ -63,6 +80,9 @@ tbody
6380
#data
6481
<svg><thead><title></table>
6582
#errors
83+
(1:1) Unexpected <svg> tag
84+
(1:20) Unexpected </table> tag
85+
(1:28) Unexpected EOF
6686
#document-fragment
6787
tbody
6888
#document
@@ -73,6 +93,9 @@ tbody
7393
#data
7494
<svg><tfoot><title></table>
7595
#errors
96+
(1:1) Unexpected <svg> tag
97+
(1:20) Unexpected </table> tag
98+
(1:28) Unexpected EOF
7699
#document-fragment
77100
tbody
78101
#document

tree-construction/tests26.dat

+12
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,10 @@ Line 1 Col 19 Expected closing tag. Unexpected end of file.
395395
#data
396396
<svg></p><foo>
397397
#errors
398+
(1:1) Missing doctype
398399
9: HTML end tag “p” in a foreign namespace context.
400+
(1:6) Unexpected </p> from in body insertion mode
401+
(1:16) Unexpected EOF
399402
#document
400403
| <html>
401404
| <head>
@@ -407,7 +410,10 @@ Line 1 Col 19 Expected closing tag. Unexpected end of file.
407410
#data
408411
<svg></br><foo>
409412
#errors
413+
(1:1) Missing doctype
410414
10: HTML end tag “br” in a foreign namespace context.
415+
(1:6) Unexpected </br> from in body insertion mode
416+
(1:16) Unexpected EOF
411417
#document
412418
| <html>
413419
| <head>
@@ -419,7 +425,10 @@ Line 1 Col 19 Expected closing tag. Unexpected end of file.
419425
#data
420426
<math></p><foo>
421427
#errors
428+
(1:1) Missing doctype
422429
10: HTML end tag “p” in a foreign namespace context.
430+
(1:7) Unexpected </p> from in body insertion mode
431+
(1:16) Unexpected EOF
423432
#document
424433
| <html>
425434
| <head>
@@ -431,7 +440,10 @@ Line 1 Col 19 Expected closing tag. Unexpected end of file.
431440
#data
432441
<math></br><foo>
433442
#errors
443+
(1:1) Missing doctype
434444
11: HTML end tag “br” in a foreign namespace context.
445+
(1:7) Unexpected </br> from in body insertion mode
446+
(1:17) Unexpected EOF
435447
#document
436448
| <html>
437449
| <head>

0 commit comments

Comments
 (0)