Skip to content

Commit 68ee040

Browse files
stevecheckowayjgraham
authored andcommitted
Add missing errors
These are tricky. A `<math>` tag as the first token in a document fragment whose context node is `td` (or `th`, but this isn't tested here) is fine. One in a document fragment whose context node is `tr`, `thead`, `tbody`, or `tfoot` is a parse error and the elements are foster parented. The table element start tags after the `<mo>` tag are parsed as html and there are no `tr` (for `tr` elements) elements or `thead`, `tbody`, or `tfoot` (for the others) elements in table scope which is a parse error. I just invented some sames for those. The `</table>` tag after the `<mo>` is parsed as foreign but it doesn't match `<mo>` so it's a parse error. Finally, the EOF occurs while a bunch of elements are open which is a parse error.
1 parent 6da5583 commit 68ee040

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

tree-construction/math.dat

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#data
22
<math><tr><td><mo><tr>
33
#errors
4+
(1,22): unexpected-start-tag
5+
(1,23): expected-closing-tag-but-got-eof
46
#document-fragment
57
td
68
#document
@@ -12,6 +14,9 @@ td
1214
#data
1315
<math><tr><td><mo><tr>
1416
#errors
17+
(1,6): foster-parenting-start-tag
18+
(1,22): expected-tr-in-table-scope
19+
(1,23): expected-closing-tag-but-got-eof
1520
#document-fragment
1621
tr
1722
#document
@@ -23,6 +28,9 @@ tr
2328
#data
2429
<math><thead><mo><tbody>
2530
#errors
31+
(1,6): foster-parenting-start-tag
32+
(1,24): expected-table-part-in-table-scope
33+
(1,25): expected-closing-tag-but-got-eof
2634
#document-fragment
2735
thead
2836
#document
@@ -33,6 +41,9 @@ thead
3341
#data
3442
<math><tfoot><mo><tbody>
3543
#errors
44+
(1,6): foster-parenting-start-tag
45+
(1,24): expected-table-part-in-table-scope
46+
(1,25): expected-closing-tag-but-got-eof
3647
#document-fragment
3748
tfoot
3849
#document
@@ -43,6 +54,9 @@ tfoot
4354
#data
4455
<math><tbody><mo><tfoot>
4556
#errors
57+
(1,6): foster-parenting-start-tag
58+
(1,24): expected-table-part-in-table-scope
59+
(1,25): expected-closing-tag-but-got-eof
4660
#document-fragment
4761
tbody
4862
#document
@@ -53,6 +67,9 @@ tbody
5367
#data
5468
<math><tbody><mo></table>
5569
#errors
70+
(1,6): foster-parenting-start-tag
71+
(1,25): unexpected-end-tag-in-math
72+
(1,26): expected-closing-tag-but-got-eof
5673
#document-fragment
5774
tbody
5875
#document
@@ -63,6 +80,9 @@ tbody
6380
#data
6481
<math><thead><mo></table>
6582
#errors
83+
(1,6): foster-parenting-start-tag
84+
(1,25): unexpected-end-tag-in-math
85+
(1,26): expected-closing-tag-but-got-eof
6686
#document-fragment
6787
tbody
6888
#document
@@ -73,6 +93,9 @@ tbody
7393
#data
7494
<math><tfoot><mo></table>
7595
#errors
96+
(1,6): foster-parenting-start-tag
97+
(1,25): unexpected-end-tag-in-math
98+
(1,26): expected-closing-tag-but-got-eof
7699
#document-fragment
77100
tbody
78101
#document

0 commit comments

Comments
 (0)