@tkeron/html-parser 0.1.7 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/README.md +1 -7
  2. package/bun.lock +5 -0
  3. package/index.ts +4 -0
  4. package/package.json +7 -1
  5. package/src/css-selector.ts +1 -1
  6. package/src/dom-simulator.ts +38 -16
  7. package/src/encoding.ts +39 -0
  8. package/src/index.ts +9 -0
  9. package/src/parser.ts +478 -144
  10. package/src/serializer.ts +450 -0
  11. package/src/tokenizer.ts +59 -43
  12. package/tests/advanced.test.ts +119 -106
  13. package/tests/custom-elements.test.ts +172 -162
  14. package/tests/dom-extended.test.ts +12 -12
  15. package/tests/dom-manipulation.test.ts +9 -10
  16. package/tests/dom.test.ts +32 -27
  17. package/tests/helpers/tokenizer-adapter.test.ts +70 -0
  18. package/tests/helpers/tokenizer-adapter.ts +65 -0
  19. package/tests/helpers/tree-adapter.test.ts +39 -0
  20. package/tests/helpers/tree-adapter.ts +43 -0
  21. package/tests/html5lib-data/tokenizer/namedEntities.test +42422 -0
  22. package/tests/html5lib-data/tokenizer/pendingSpecChanges.test +9 -0
  23. package/tests/html5lib-data/tree-construction/adoption01.dat +354 -0
  24. package/tests/html5lib-data/tree-construction/adoption02.dat +39 -0
  25. package/tests/html5lib-data/tree-construction/domjs-unsafe.dat +0 -0
  26. package/tests/html5lib-data/tree-construction/entities02.dat +309 -0
  27. package/tests/html5lib-data/tree-construction/html5test-com.dat +301 -0
  28. package/tests/html5lib-data/tree-construction/math.dat +104 -0
  29. package/tests/html5lib-data/tree-construction/namespace-sensitivity.dat +22 -0
  30. package/tests/html5lib-data/tree-construction/noscript01.dat +237 -0
  31. package/tests/html5lib-data/tree-construction/ruby.dat +302 -0
  32. package/tests/html5lib-data/tree-construction/scriptdata01.dat +372 -0
  33. package/tests/html5lib-data/tree-construction/svg.dat +104 -0
  34. package/tests/html5lib-data/tree-construction/template.dat +1673 -0
  35. package/tests/html5lib-data/tree-construction/tests10.dat +853 -0
  36. package/tests/html5lib-data/tree-construction/tests11.dat +523 -0
  37. package/tests/html5lib-data/tree-construction/tests20.dat +842 -0
  38. package/tests/html5lib-data/tree-construction/tests21.dat +306 -0
  39. package/tests/html5lib-data/tree-construction/tests23.dat +168 -0
  40. package/tests/html5lib-data/tree-construction/tests24.dat +79 -0
  41. package/tests/html5lib-data/tree-construction/tests5.dat +210 -0
  42. package/tests/html5lib-data/tree-construction/tests6.dat +663 -0
  43. package/tests/html5lib-data/tree-construction/tests_innerHTML_1.dat +844 -0
  44. package/tests/parser.test.ts +172 -193
  45. package/tests/serializer-core.test.ts +16 -0
  46. package/tests/serializer-data/core.test +125 -0
  47. package/tests/serializer-data/injectmeta.test +66 -0
  48. package/tests/serializer-data/optionaltags.test +965 -0
  49. package/tests/serializer-data/options.test +60 -0
  50. package/tests/serializer-data/whitespace.test +51 -0
  51. package/tests/serializer-injectmeta.test.ts +16 -0
  52. package/tests/serializer-optionaltags.test.ts +16 -0
  53. package/tests/serializer-options.test.ts +16 -0
  54. package/tests/serializer-whitespace.test.ts +16 -0
  55. package/tests/tokenizer-namedEntities.test.ts +20 -0
  56. package/tests/tokenizer-pendingSpecChanges.test.ts +20 -0
  57. package/tests/tokenizer.test.ts +3 -6
  58. package/tests/tree-construction-adoption01.test.ts +37 -0
  59. package/tests/tree-construction-adoption02.test.ts +34 -0
  60. package/tests/tree-construction-domjs-unsafe.test.ts +24 -0
  61. package/tests/tree-construction-entities02.test.ts +33 -0
  62. package/tests/tree-construction-html5test-com.test.ts +24 -0
  63. package/tests/tree-construction-math.test.ts +18 -0
  64. package/tests/tree-construction-namespace-sensitivity.test.ts +18 -0
  65. package/tests/tree-construction-noscript01.test.ts +18 -0
  66. package/tests/tree-construction-ruby.test.ts +21 -0
  67. package/tests/tree-construction-scriptdata01.test.ts +21 -0
  68. package/tests/tree-construction-svg.test.ts +21 -0
  69. package/tests/tree-construction-template.test.ts +21 -0
  70. package/tests/tree-construction-tests10.test.ts +21 -0
  71. package/tests/tree-construction-tests11.test.ts +21 -0
  72. package/tests/tree-construction-tests20.test.ts +18 -0
  73. package/tests/tree-construction-tests21.test.ts +18 -0
  74. package/tests/tree-construction-tests23.test.ts +18 -0
  75. package/tests/tree-construction-tests24.test.ts +18 -0
  76. package/tests/tree-construction-tests5.test.ts +21 -0
  77. package/tests/tree-construction-tests6.test.ts +21 -0
  78. package/tests/tree-construction-tests_innerHTML_1.test.ts +21 -0
  79. package/tests/official/README.md +0 -87
  80. package/tests/official/acid/acid-tests.test.ts +0 -309
  81. package/tests/official/final-output/final-output.test.ts +0 -361
  82. package/tests/official/html5lib/tokenizer-utils.ts +0 -192
  83. package/tests/official/html5lib/tokenizer.test.ts +0 -171
  84. package/tests/official/html5lib/tree-construction-utils.ts +0 -194
  85. package/tests/official/html5lib/tree-construction.test.ts +0 -250
  86. package/tests/official/validator/validator-tests.test.ts +0 -237
  87. package/tests/official/validator-nu/validator-nu.test.ts +0 -335
  88. package/tests/official/whatwg/whatwg-tests.test.ts +0 -205
  89. package/tests/official/wpt/wpt-tests.test.ts +0 -409
@@ -0,0 +1,853 @@
1
+ #data
2
+ <!DOCTYPE html><svg></svg>
3
+ #errors
4
+ #document
5
+ | <!DOCTYPE html>
6
+ | <html>
7
+ | <head>
8
+ | <body>
9
+ | <svg svg>
10
+
11
+ #data
12
+ <!DOCTYPE html><svg></svg><![CDATA[a]]>
13
+ #errors
14
+ (1,28) expected-dashes-or-doctype
15
+ #new-errors
16
+ (1:35) cdata-in-html-content
17
+ #document
18
+ | <!DOCTYPE html>
19
+ | <html>
20
+ | <head>
21
+ | <body>
22
+ | <svg svg>
23
+ | <!-- [CDATA[a]] -->
24
+
25
+ #data
26
+ <!DOCTYPE html><body><svg></svg>
27
+ #errors
28
+ #document
29
+ | <!DOCTYPE html>
30
+ | <html>
31
+ | <head>
32
+ | <body>
33
+ | <svg svg>
34
+
35
+ #data
36
+ <!DOCTYPE html><body><select><svg></svg></select>
37
+ #errors
38
+ #document
39
+ | <!DOCTYPE html>
40
+ | <html>
41
+ | <head>
42
+ | <body>
43
+ | <select>
44
+ | <svg svg>
45
+
46
+ #data
47
+ <!DOCTYPE html><body><select><option><svg></svg></option></select>
48
+ #errors
49
+ #document
50
+ | <!DOCTYPE html>
51
+ | <html>
52
+ | <head>
53
+ | <body>
54
+ | <select>
55
+ | <option>
56
+ | <svg svg>
57
+
58
+ #data
59
+ <!DOCTYPE html><body><table><svg></svg></table>
60
+ #errors
61
+ (1,33) foster-parenting-start-tag
62
+ #document
63
+ | <!DOCTYPE html>
64
+ | <html>
65
+ | <head>
66
+ | <body>
67
+ | <svg svg>
68
+ | <table>
69
+
70
+ #data
71
+ <!DOCTYPE html><body><table><svg><g>foo</g></svg></table>
72
+ #errors
73
+ (1,33) foster-parenting-start-tag
74
+ #document
75
+ | <!DOCTYPE html>
76
+ | <html>
77
+ | <head>
78
+ | <body>
79
+ | <svg svg>
80
+ | <svg g>
81
+ | "foo"
82
+ | <table>
83
+
84
+ #data
85
+ <!DOCTYPE html><body><table><svg><g>foo</g><g>bar</g></svg></table>
86
+ #errors
87
+ (1,33) foster-parenting-start-tag
88
+ #document
89
+ | <!DOCTYPE html>
90
+ | <html>
91
+ | <head>
92
+ | <body>
93
+ | <svg svg>
94
+ | <svg g>
95
+ | "foo"
96
+ | <svg g>
97
+ | "bar"
98
+ | <table>
99
+
100
+ #data
101
+ <!DOCTYPE html><body><table><tbody><svg><g>foo</g><g>bar</g></svg></tbody></table>
102
+ #errors
103
+ (1,40) foster-parenting-start-tag
104
+ #document
105
+ | <!DOCTYPE html>
106
+ | <html>
107
+ | <head>
108
+ | <body>
109
+ | <svg svg>
110
+ | <svg g>
111
+ | "foo"
112
+ | <svg g>
113
+ | "bar"
114
+ | <table>
115
+ | <tbody>
116
+
117
+ #data
118
+ <!DOCTYPE html><body><table><tbody><tr><svg><g>foo</g><g>bar</g></svg></tr></tbody></table>
119
+ #errors
120
+ (1,44) foster-parenting-start-tag
121
+ #document
122
+ | <!DOCTYPE html>
123
+ | <html>
124
+ | <head>
125
+ | <body>
126
+ | <svg svg>
127
+ | <svg g>
128
+ | "foo"
129
+ | <svg g>
130
+ | "bar"
131
+ | <table>
132
+ | <tbody>
133
+ | <tr>
134
+
135
+ #data
136
+ <!DOCTYPE html><body><table><tbody><tr><td><svg><g>foo</g><g>bar</g></svg></td></tr></tbody></table>
137
+ #errors
138
+ #document
139
+ | <!DOCTYPE html>
140
+ | <html>
141
+ | <head>
142
+ | <body>
143
+ | <table>
144
+ | <tbody>
145
+ | <tr>
146
+ | <td>
147
+ | <svg svg>
148
+ | <svg g>
149
+ | "foo"
150
+ | <svg g>
151
+ | "bar"
152
+
153
+ #data
154
+ <!DOCTYPE html><body><table><tbody><tr><td><svg><g>foo</g><g>bar</g></svg><p>baz</td></tr></tbody></table>
155
+ #errors
156
+ #document
157
+ | <!DOCTYPE html>
158
+ | <html>
159
+ | <head>
160
+ | <body>
161
+ | <table>
162
+ | <tbody>
163
+ | <tr>
164
+ | <td>
165
+ | <svg svg>
166
+ | <svg g>
167
+ | "foo"
168
+ | <svg g>
169
+ | "bar"
170
+ | <p>
171
+ | "baz"
172
+
173
+ #data
174
+ <!DOCTYPE html><body><table><caption><svg><g>foo</g><g>bar</g></svg><p>baz</caption></table>
175
+ #errors
176
+ #document
177
+ | <!DOCTYPE html>
178
+ | <html>
179
+ | <head>
180
+ | <body>
181
+ | <table>
182
+ | <caption>
183
+ | <svg svg>
184
+ | <svg g>
185
+ | "foo"
186
+ | <svg g>
187
+ | "bar"
188
+ | <p>
189
+ | "baz"
190
+
191
+ #data
192
+ <!DOCTYPE html><body><table><caption><svg><g>foo</g><g>bar</g><p>baz</table><p>quux
193
+ #errors
194
+ (1,65) unexpected-html-element-in-foreign-content
195
+ #document
196
+ | <!DOCTYPE html>
197
+ | <html>
198
+ | <head>
199
+ | <body>
200
+ | <table>
201
+ | <caption>
202
+ | <svg svg>
203
+ | <svg g>
204
+ | "foo"
205
+ | <svg g>
206
+ | "bar"
207
+ | <p>
208
+ | "baz"
209
+ | <p>
210
+ | "quux"
211
+
212
+ #data
213
+ <!DOCTYPE html><body><table><caption><svg><g>foo</g><g>bar</g>baz</table><p>quux
214
+ #errors
215
+ (1,73) unexpected-end-tag
216
+ (1,73) expected-one-end-tag-but-got-another
217
+ #document
218
+ | <!DOCTYPE html>
219
+ | <html>
220
+ | <head>
221
+ | <body>
222
+ | <table>
223
+ | <caption>
224
+ | <svg svg>
225
+ | <svg g>
226
+ | "foo"
227
+ | <svg g>
228
+ | "bar"
229
+ | "baz"
230
+ | <p>
231
+ | "quux"
232
+
233
+ #data
234
+ <!DOCTYPE html><body><table><colgroup><svg><g>foo</g><g>bar</g><p>baz</table><p>quux
235
+ #errors
236
+ (1,43) foster-parenting-start-tag svg
237
+ (1,66) unexpected HTML-like start tag token in foreign content
238
+ (1,66) foster-parenting-start-tag
239
+ (1,67) foster-parenting-character
240
+ (1,68) foster-parenting-character
241
+ (1,69) foster-parenting-character
242
+ #document
243
+ | <!DOCTYPE html>
244
+ | <html>
245
+ | <head>
246
+ | <body>
247
+ | <svg svg>
248
+ | <svg g>
249
+ | "foo"
250
+ | <svg g>
251
+ | "bar"
252
+ | <p>
253
+ | "baz"
254
+ | <table>
255
+ | <colgroup>
256
+ | <p>
257
+ | "quux"
258
+
259
+ #data
260
+ <!DOCTYPE html><body><table><tr><td><select><svg><g>foo</g><g>bar</g><p>baz</table><p>quux
261
+ #errors
262
+ 1:70: ERROR: Start tag 'p' isn't allowed here. Currently open tags: html, body, table, tbody, tr, td, select, svg.
263
+ 1:76: ERROR: End tag 'table' isn't allowed here. Currently open tags: html, body, table, tbody, tr, td, select.
264
+ #document
265
+ | <!DOCTYPE html>
266
+ | <html>
267
+ | <head>
268
+ | <body>
269
+ | <table>
270
+ | <tbody>
271
+ | <tr>
272
+ | <td>
273
+ | <select>
274
+ | <svg svg>
275
+ | <svg g>
276
+ | "foo"
277
+ | <svg g>
278
+ | "bar"
279
+ | <p>
280
+ | "baz"
281
+ | <p>
282
+ | "quux"
283
+
284
+ #data
285
+ <!DOCTYPE html><body><table><select><svg><g>foo</g><g>bar</g><p>baz</table><p>quux
286
+ #errors
287
+ 1:29: ERROR: Start tag 'select' isn't allowed here. Currently open tags: html, body, table.
288
+ 1:37: ERROR: Start tag 'svg' isn't allowed here. Currently open tags: html, body, table, select.
289
+ 1:62: ERROR: Start tag 'p' isn't allowed here. Currently open tags: html, body, table, select, svg.
290
+ 1:62: ERROR: Start tag 'p' isn't allowed here. Currently open tags: html, body, table, select.
291
+ 1:65: ERROR: Character tokens aren't legal here
292
+ 1:66: ERROR: Character tokens aren't legal here
293
+ 1:67: ERROR: Character tokens aren't legal here
294
+ #document
295
+ | <!DOCTYPE html>
296
+ | <html>
297
+ | <head>
298
+ | <body>
299
+ | <select>
300
+ | <svg svg>
301
+ | <svg g>
302
+ | "foo"
303
+ | <svg g>
304
+ | "bar"
305
+ | <p>
306
+ | "baz"
307
+ | <table>
308
+ | <p>
309
+ | "quux"
310
+
311
+ #data
312
+ <!DOCTYPE html><body></body></html><svg><g>foo</g><g>bar</g><p>baz
313
+ #errors
314
+ (1,40) expected-eof-but-got-start-tag
315
+ (1,63) unexpected-html-element-in-foreign-content
316
+ #document
317
+ | <!DOCTYPE html>
318
+ | <html>
319
+ | <head>
320
+ | <body>
321
+ | <svg svg>
322
+ | <svg g>
323
+ | "foo"
324
+ | <svg g>
325
+ | "bar"
326
+ | <p>
327
+ | "baz"
328
+
329
+ #data
330
+ <!DOCTYPE html><body></body><svg><g>foo</g><g>bar</g><p>baz
331
+ #errors
332
+ (1,33) unexpected-start-tag-after-body
333
+ (1,56) unexpected-html-element-in-foreign-content
334
+ #document
335
+ | <!DOCTYPE html>
336
+ | <html>
337
+ | <head>
338
+ | <body>
339
+ | <svg svg>
340
+ | <svg g>
341
+ | "foo"
342
+ | <svg g>
343
+ | "bar"
344
+ | <p>
345
+ | "baz"
346
+
347
+ #data
348
+ <!DOCTYPE html><frameset><svg><g></g><g></g><p><span>
349
+ #errors
350
+ (1,30) unexpected-start-tag-in-frameset
351
+ (1,33) unexpected-start-tag-in-frameset
352
+ (1,37) unexpected-end-tag-in-frameset
353
+ (1,40) unexpected-start-tag-in-frameset
354
+ (1,44) unexpected-end-tag-in-frameset
355
+ (1,47) unexpected-start-tag-in-frameset
356
+ (1,53) unexpected-start-tag-in-frameset
357
+ (1,53) eof-in-frameset
358
+ #document
359
+ | <!DOCTYPE html>
360
+ | <html>
361
+ | <head>
362
+ | <frameset>
363
+
364
+ #data
365
+ <!DOCTYPE html><frameset></frameset><svg><g></g><g></g><p><span>
366
+ #errors
367
+ (1,41) unexpected-start-tag-after-frameset
368
+ (1,44) unexpected-start-tag-after-frameset
369
+ (1,48) unexpected-end-tag-after-frameset
370
+ (1,51) unexpected-start-tag-after-frameset
371
+ (1,55) unexpected-end-tag-after-frameset
372
+ (1,58) unexpected-start-tag-after-frameset
373
+ (1,64) unexpected-start-tag-after-frameset
374
+ #document
375
+ | <!DOCTYPE html>
376
+ | <html>
377
+ | <head>
378
+ | <frameset>
379
+
380
+ #data
381
+ <!DOCTYPE html><body xlink:href=foo><svg xlink:href=foo></svg>
382
+ #errors
383
+ #document
384
+ | <!DOCTYPE html>
385
+ | <html>
386
+ | <head>
387
+ | <body>
388
+ | xlink:href="foo"
389
+ | <svg svg>
390
+ | xlink href="foo"
391
+
392
+ #data
393
+ <!DOCTYPE html><body xlink:href=foo xml:lang=en><svg><g xml:lang=en xlink:href=foo></g></svg>
394
+ #errors
395
+ #document
396
+ | <!DOCTYPE html>
397
+ | <html>
398
+ | <head>
399
+ | <body>
400
+ | xlink:href="foo"
401
+ | xml:lang="en"
402
+ | <svg svg>
403
+ | <svg g>
404
+ | xlink href="foo"
405
+ | xml lang="en"
406
+
407
+ #data
408
+ <!DOCTYPE html><body xlink:href=foo xml:lang=en><svg><g xml:lang=en xlink:href=foo /></svg>
409
+ #errors
410
+ #document
411
+ | <!DOCTYPE html>
412
+ | <html>
413
+ | <head>
414
+ | <body>
415
+ | xlink:href="foo"
416
+ | xml:lang="en"
417
+ | <svg svg>
418
+ | <svg g>
419
+ | xlink href="foo"
420
+ | xml lang="en"
421
+
422
+ #data
423
+ <!DOCTYPE html><body xlink:href=foo xml:lang=en><svg><g xml:lang=en xlink:href=foo />bar</svg>
424
+ #errors
425
+ #document
426
+ | <!DOCTYPE html>
427
+ | <html>
428
+ | <head>
429
+ | <body>
430
+ | xlink:href="foo"
431
+ | xml:lang="en"
432
+ | <svg svg>
433
+ | <svg g>
434
+ | xlink href="foo"
435
+ | xml lang="en"
436
+ | "bar"
437
+
438
+ #data
439
+ <svg></path>
440
+ #errors
441
+ (1,5) expected-doctype-but-got-start-tag
442
+ (1,12) unexpected-end-tag
443
+ (1,12) unexpected-end-tag
444
+ (1,12) expected-closing-tag-but-got-eof
445
+ #document
446
+ | <html>
447
+ | <head>
448
+ | <body>
449
+ | <svg svg>
450
+
451
+ #data
452
+ <div><svg></div>a
453
+ #errors
454
+ (1,5) expected-doctype-but-got-start-tag
455
+ (1,16) unexpected-end-tag
456
+ (1,16) end-tag-too-early
457
+ #document
458
+ | <html>
459
+ | <head>
460
+ | <body>
461
+ | <div>
462
+ | <svg svg>
463
+ | "a"
464
+
465
+ #data
466
+ <div><svg><path></div>a
467
+ #errors
468
+ (1,5) expected-doctype-but-got-start-tag
469
+ (1,22) unexpected-end-tag
470
+ (1,22) end-tag-too-early
471
+ #document
472
+ | <html>
473
+ | <head>
474
+ | <body>
475
+ | <div>
476
+ | <svg svg>
477
+ | <svg path>
478
+ | "a"
479
+
480
+ #data
481
+ <div><svg><path></svg><path>
482
+ #errors
483
+ (1,5) expected-doctype-but-got-start-tag
484
+ (1,22) unexpected-end-tag
485
+ (1,28) expected-closing-tag-but-got-eof
486
+ #document
487
+ | <html>
488
+ | <head>
489
+ | <body>
490
+ | <div>
491
+ | <svg svg>
492
+ | <svg path>
493
+ | <path>
494
+
495
+ #data
496
+ <div><svg><path><foreignObject><math></div>a
497
+ #errors
498
+ (1,5) expected-doctype-but-got-start-tag
499
+ (1,43) unexpected-end-tag
500
+ (1,43) end-tag-too-early
501
+ (1,44) expected-closing-tag-but-got-eof
502
+ #document
503
+ | <html>
504
+ | <head>
505
+ | <body>
506
+ | <div>
507
+ | <svg svg>
508
+ | <svg path>
509
+ | <svg foreignObject>
510
+ | <math math>
511
+ | "a"
512
+
513
+ #data
514
+ <div><svg><path><foreignObject><p></div>a
515
+ #errors
516
+ (1,5) expected-doctype-but-got-start-tag
517
+ (1,40) end-tag-too-early
518
+ (1,41) expected-closing-tag-but-got-eof
519
+ #document
520
+ | <html>
521
+ | <head>
522
+ | <body>
523
+ | <div>
524
+ | <svg svg>
525
+ | <svg path>
526
+ | <svg foreignObject>
527
+ | <p>
528
+ | "a"
529
+
530
+ #data
531
+ <!DOCTYPE html><svg><desc><div><svg><ul>a
532
+ #errors
533
+ (1,40) unexpected-html-element-in-foreign-content
534
+ (1,41) expected-closing-tag-but-got-eof
535
+ #document
536
+ | <!DOCTYPE html>
537
+ | <html>
538
+ | <head>
539
+ | <body>
540
+ | <svg svg>
541
+ | <svg desc>
542
+ | <div>
543
+ | <svg svg>
544
+ | <ul>
545
+ | "a"
546
+
547
+ #data
548
+ <!DOCTYPE html><svg><desc><svg><ul>a
549
+ #errors
550
+ (1,35) unexpected-html-element-in-foreign-content
551
+ (1,36) expected-closing-tag-but-got-eof
552
+ #document
553
+ | <!DOCTYPE html>
554
+ | <html>
555
+ | <head>
556
+ | <body>
557
+ | <svg svg>
558
+ | <svg desc>
559
+ | <svg svg>
560
+ | <ul>
561
+ | "a"
562
+
563
+ #data
564
+ <!DOCTYPE html><p><svg><desc><p>
565
+ #errors
566
+ (1,32) expected-closing-tag-but-got-eof
567
+ #document
568
+ | <!DOCTYPE html>
569
+ | <html>
570
+ | <head>
571
+ | <body>
572
+ | <p>
573
+ | <svg svg>
574
+ | <svg desc>
575
+ | <p>
576
+
577
+ #data
578
+ <!DOCTYPE html><p><svg><title><p>
579
+ #errors
580
+ (1,33) expected-closing-tag-but-got-eof
581
+ #document
582
+ | <!DOCTYPE html>
583
+ | <html>
584
+ | <head>
585
+ | <body>
586
+ | <p>
587
+ | <svg svg>
588
+ | <svg title>
589
+ | <p>
590
+
591
+ #data
592
+ <div><svg><path><foreignObject><p></foreignObject><p>
593
+ #errors
594
+ (1,5) expected-doctype-but-got-start-tag
595
+ (1,50) unexpected-end-tag
596
+ (1,53) expected-closing-tag-but-got-eof
597
+ #document
598
+ | <html>
599
+ | <head>
600
+ | <body>
601
+ | <div>
602
+ | <svg svg>
603
+ | <svg path>
604
+ | <svg foreignObject>
605
+ | <p>
606
+ | <p>
607
+
608
+ #data
609
+ <math><mi><div><object><div><span></span></div></object></div></mi><mi>
610
+ #errors
611
+ (1,6) expected-doctype-but-got-start-tag
612
+ (1,71) expected-closing-tag-but-got-eof
613
+ #document
614
+ | <html>
615
+ | <head>
616
+ | <body>
617
+ | <math math>
618
+ | <math mi>
619
+ | <div>
620
+ | <object>
621
+ | <div>
622
+ | <span>
623
+ | <math mi>
624
+
625
+ #data
626
+ <math><mi><svg><foreignObject><div><div></div></div></foreignObject></svg></mi><mi>
627
+ #errors
628
+ (1,6) expected-doctype-but-got-start-tag
629
+ (1,83) expected-closing-tag-but-got-eof
630
+ #document
631
+ | <html>
632
+ | <head>
633
+ | <body>
634
+ | <math math>
635
+ | <math mi>
636
+ | <svg svg>
637
+ | <svg foreignObject>
638
+ | <div>
639
+ | <div>
640
+ | <math mi>
641
+
642
+ #data
643
+ <svg><script></script><path>
644
+ #errors
645
+ (1,5) expected-doctype-but-got-start-tag
646
+ (1,28) expected-closing-tag-but-got-eof
647
+ #document
648
+ | <html>
649
+ | <head>
650
+ | <body>
651
+ | <svg svg>
652
+ | <svg script>
653
+ | <svg path>
654
+
655
+ #data
656
+ <table><svg></svg><tr>
657
+ #errors
658
+ (1,7) expected-doctype-but-got-start-tag
659
+ (1,12) unexpected-start-tag-implies-table-voodoo
660
+ (1,22) eof-in-table
661
+ #document
662
+ | <html>
663
+ | <head>
664
+ | <body>
665
+ | <svg svg>
666
+ | <table>
667
+ | <tbody>
668
+ | <tr>
669
+
670
+ #data
671
+ <math><mi><mglyph>
672
+ #errors
673
+ (1,6) expected-doctype-but-got-start-tag
674
+ (1,18) expected-closing-tag-but-got-eof
675
+ #document
676
+ | <html>
677
+ | <head>
678
+ | <body>
679
+ | <math math>
680
+ | <math mi>
681
+ | <math mglyph>
682
+
683
+ #data
684
+ <math><mi><malignmark>
685
+ #errors
686
+ (1,6) expected-doctype-but-got-start-tag
687
+ (1,22) expected-closing-tag-but-got-eof
688
+ #document
689
+ | <html>
690
+ | <head>
691
+ | <body>
692
+ | <math math>
693
+ | <math mi>
694
+ | <math malignmark>
695
+
696
+ #data
697
+ <math><mo><mglyph>
698
+ #errors
699
+ (1,6) expected-doctype-but-got-start-tag
700
+ (1,18) expected-closing-tag-but-got-eof
701
+ #document
702
+ | <html>
703
+ | <head>
704
+ | <body>
705
+ | <math math>
706
+ | <math mo>
707
+ | <math mglyph>
708
+
709
+ #data
710
+ <math><mo><malignmark>
711
+ #errors
712
+ (1,6) expected-doctype-but-got-start-tag
713
+ (1,22) expected-closing-tag-but-got-eof
714
+ #document
715
+ | <html>
716
+ | <head>
717
+ | <body>
718
+ | <math math>
719
+ | <math mo>
720
+ | <math malignmark>
721
+
722
+ #data
723
+ <math><mn><mglyph>
724
+ #errors
725
+ (1,6) expected-doctype-but-got-start-tag
726
+ (1,18) expected-closing-tag-but-got-eof
727
+ #document
728
+ | <html>
729
+ | <head>
730
+ | <body>
731
+ | <math math>
732
+ | <math mn>
733
+ | <math mglyph>
734
+
735
+ #data
736
+ <math><mn><malignmark>
737
+ #errors
738
+ (1,6) expected-doctype-but-got-start-tag
739
+ (1,22) expected-closing-tag-but-got-eof
740
+ #document
741
+ | <html>
742
+ | <head>
743
+ | <body>
744
+ | <math math>
745
+ | <math mn>
746
+ | <math malignmark>
747
+
748
+ #data
749
+ <math><ms><mglyph>
750
+ #errors
751
+ (1,6) expected-doctype-but-got-start-tag
752
+ (1,18) expected-closing-tag-but-got-eof
753
+ #document
754
+ | <html>
755
+ | <head>
756
+ | <body>
757
+ | <math math>
758
+ | <math ms>
759
+ | <math mglyph>
760
+
761
+ #data
762
+ <math><ms><malignmark>
763
+ #errors
764
+ (1,6) expected-doctype-but-got-start-tag
765
+ (1,22) expected-closing-tag-but-got-eof
766
+ #document
767
+ | <html>
768
+ | <head>
769
+ | <body>
770
+ | <math math>
771
+ | <math ms>
772
+ | <math malignmark>
773
+
774
+ #data
775
+ <math><mtext><mglyph>
776
+ #errors
777
+ (1,6) expected-doctype-but-got-start-tag
778
+ (1,21) expected-closing-tag-but-got-eof
779
+ #document
780
+ | <html>
781
+ | <head>
782
+ | <body>
783
+ | <math math>
784
+ | <math mtext>
785
+ | <math mglyph>
786
+
787
+ #data
788
+ <math><mtext><malignmark>
789
+ #errors
790
+ (1,6) expected-doctype-but-got-start-tag
791
+ (1,25) expected-closing-tag-but-got-eof
792
+ #document
793
+ | <html>
794
+ | <head>
795
+ | <body>
796
+ | <math math>
797
+ | <math mtext>
798
+ | <math malignmark>
799
+
800
+ #data
801
+ <math><annotation-xml><svg></svg></annotation-xml><mi>
802
+ #errors
803
+ (1,6) expected-doctype-but-got-start-tag
804
+ (1,54) expected-closing-tag-but-got-eof
805
+ #document
806
+ | <html>
807
+ | <head>
808
+ | <body>
809
+ | <math math>
810
+ | <math annotation-xml>
811
+ | <svg svg>
812
+ | <math mi>
813
+
814
+ #data
815
+ <math><annotation-xml><svg><foreignObject><div><math><mi></mi></math><span></span></div></foreignObject><path></path></svg></annotation-xml><mi>
816
+ #errors
817
+ (1,6) expected-doctype-but-got-start-tag
818
+ (1,144) expected-closing-tag-but-got-eof
819
+ #document
820
+ | <html>
821
+ | <head>
822
+ | <body>
823
+ | <math math>
824
+ | <math annotation-xml>
825
+ | <svg svg>
826
+ | <svg foreignObject>
827
+ | <div>
828
+ | <math math>
829
+ | <math mi>
830
+ | <span>
831
+ | <svg path>
832
+ | <math mi>
833
+
834
+ #data
835
+ <math><annotation-xml><svg><foreignObject><math><mi><svg></svg></mi><mo></mo></math><span></span></foreignObject><path></path></svg></annotation-xml><mi>
836
+ #errors
837
+ (1,6) expected-doctype-but-got-start-tag
838
+ (1,153) expected-closing-tag-but-got-eof
839
+ #document
840
+ | <html>
841
+ | <head>
842
+ | <body>
843
+ | <math math>
844
+ | <math annotation-xml>
845
+ | <svg svg>
846
+ | <svg foreignObject>
847
+ | <math math>
848
+ | <math mi>
849
+ | <svg svg>
850
+ | <math mo>
851
+ | <span>
852
+ | <svg path>
853
+ | <math mi>