@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,842 @@
1
+ #data
2
+ <!doctype html><p><button><button>
3
+ #errors
4
+ (1,34): unexpected-start-tag-implies-end-tag
5
+ (1,34): expected-closing-tag-but-got-eof
6
+ #document
7
+ | <!DOCTYPE html>
8
+ | <html>
9
+ | <head>
10
+ | <body>
11
+ | <p>
12
+ | <button>
13
+ | <button>
14
+
15
+ #data
16
+ <!doctype html><p><button><address>
17
+ #errors
18
+ (1,35): expected-closing-tag-but-got-eof
19
+ #document
20
+ | <!DOCTYPE html>
21
+ | <html>
22
+ | <head>
23
+ | <body>
24
+ | <p>
25
+ | <button>
26
+ | <address>
27
+
28
+ #data
29
+ <!doctype html><p><button><article>
30
+ #errors
31
+ (1,36): expected-closing-tag-but-got-eof
32
+ #document
33
+ | <!DOCTYPE html>
34
+ | <html>
35
+ | <head>
36
+ | <body>
37
+ | <p>
38
+ | <button>
39
+ | <article>
40
+
41
+ #data
42
+ <!doctype html><p><button><aside>
43
+ #errors
44
+ (1,34): expected-closing-tag-but-got-eof
45
+ #document
46
+ | <!DOCTYPE html>
47
+ | <html>
48
+ | <head>
49
+ | <body>
50
+ | <p>
51
+ | <button>
52
+ | <aside>
53
+
54
+ #data
55
+ <!doctype html><p><button><blockquote>
56
+ #errors
57
+ (1,38): expected-closing-tag-but-got-eof
58
+ #document
59
+ | <!DOCTYPE html>
60
+ | <html>
61
+ | <head>
62
+ | <body>
63
+ | <p>
64
+ | <button>
65
+ | <blockquote>
66
+
67
+ #data
68
+ <!doctype html><p><button><center>
69
+ #errors
70
+ (1,35): expected-closing-tag-but-got-eof
71
+ #document
72
+ | <!DOCTYPE html>
73
+ | <html>
74
+ | <head>
75
+ | <body>
76
+ | <p>
77
+ | <button>
78
+ | <center>
79
+
80
+ #data
81
+ <!doctype html><p><button><details>
82
+ #errors
83
+ (1,36): expected-closing-tag-but-got-eof
84
+ #document
85
+ | <!DOCTYPE html>
86
+ | <html>
87
+ | <head>
88
+ | <body>
89
+ | <p>
90
+ | <button>
91
+ | <details>
92
+
93
+ #data
94
+ <!doctype html><p><button><dialog>
95
+ #errors
96
+ (1,35): expected-closing-tag-but-got-eof
97
+ #document
98
+ | <!DOCTYPE html>
99
+ | <html>
100
+ | <head>
101
+ | <body>
102
+ | <p>
103
+ | <button>
104
+ | <dialog>
105
+
106
+ #data
107
+ <!doctype html><p><button><dir>
108
+ #errors
109
+ (1,32): expected-closing-tag-but-got-eof
110
+ #document
111
+ | <!DOCTYPE html>
112
+ | <html>
113
+ | <head>
114
+ | <body>
115
+ | <p>
116
+ | <button>
117
+ | <dir>
118
+
119
+ #data
120
+ <!doctype html><p><button><div>
121
+ #errors
122
+ (1,32): expected-closing-tag-but-got-eof
123
+ #document
124
+ | <!DOCTYPE html>
125
+ | <html>
126
+ | <head>
127
+ | <body>
128
+ | <p>
129
+ | <button>
130
+ | <div>
131
+
132
+ #data
133
+ <!doctype html><p><button><dl>
134
+ #errors
135
+ (1,31): expected-closing-tag-but-got-eof
136
+ #document
137
+ | <!DOCTYPE html>
138
+ | <html>
139
+ | <head>
140
+ | <body>
141
+ | <p>
142
+ | <button>
143
+ | <dl>
144
+
145
+ #data
146
+ <!doctype html><p><button><fieldset>
147
+ #errors
148
+ (1,37): expected-closing-tag-but-got-eof
149
+ #document
150
+ | <!DOCTYPE html>
151
+ | <html>
152
+ | <head>
153
+ | <body>
154
+ | <p>
155
+ | <button>
156
+ | <fieldset>
157
+
158
+ #data
159
+ <!doctype html><p><button><figcaption>
160
+ #errors
161
+ (1,39): expected-closing-tag-but-got-eof
162
+ #document
163
+ | <!DOCTYPE html>
164
+ | <html>
165
+ | <head>
166
+ | <body>
167
+ | <p>
168
+ | <button>
169
+ | <figcaption>
170
+
171
+ #data
172
+ <!doctype html><p><button><figure>
173
+ #errors
174
+ (1,35): expected-closing-tag-but-got-eof
175
+ #document
176
+ | <!DOCTYPE html>
177
+ | <html>
178
+ | <head>
179
+ | <body>
180
+ | <p>
181
+ | <button>
182
+ | <figure>
183
+
184
+ #data
185
+ <!doctype html><p><button><footer>
186
+ #errors
187
+ (1,35): expected-closing-tag-but-got-eof
188
+ #document
189
+ | <!DOCTYPE html>
190
+ | <html>
191
+ | <head>
192
+ | <body>
193
+ | <p>
194
+ | <button>
195
+ | <footer>
196
+
197
+ #data
198
+ <!doctype html><p><button><header>
199
+ #errors
200
+ (1,35): expected-closing-tag-but-got-eof
201
+ #document
202
+ | <!DOCTYPE html>
203
+ | <html>
204
+ | <head>
205
+ | <body>
206
+ | <p>
207
+ | <button>
208
+ | <header>
209
+
210
+ #data
211
+ <!doctype html><p><button><hgroup>
212
+ #errors
213
+ (1,35): expected-closing-tag-but-got-eof
214
+ #document
215
+ | <!DOCTYPE html>
216
+ | <html>
217
+ | <head>
218
+ | <body>
219
+ | <p>
220
+ | <button>
221
+ | <hgroup>
222
+
223
+ #data
224
+ <!doctype html><p><button><main>
225
+ #errors
226
+ (1,33): expected-closing-tag-but-got-eof
227
+ #document
228
+ | <!DOCTYPE html>
229
+ | <html>
230
+ | <head>
231
+ | <body>
232
+ | <p>
233
+ | <button>
234
+ | <main>
235
+
236
+ #data
237
+ <!doctype html><p><button><menu>
238
+ #errors
239
+ (1,32): expected-closing-tag-but-got-eof
240
+ #document
241
+ | <!DOCTYPE html>
242
+ | <html>
243
+ | <head>
244
+ | <body>
245
+ | <p>
246
+ | <button>
247
+ | <menu>
248
+
249
+ #data
250
+ <!doctype html><p><button><nav>
251
+ #errors
252
+ (1,32): expected-closing-tag-but-got-eof
253
+ #document
254
+ | <!DOCTYPE html>
255
+ | <html>
256
+ | <head>
257
+ | <body>
258
+ | <p>
259
+ | <button>
260
+ | <nav>
261
+
262
+ #data
263
+ <!doctype html><p><button><ol>
264
+ #errors
265
+ (1,31): expected-closing-tag-but-got-eof
266
+ #document
267
+ | <!DOCTYPE html>
268
+ | <html>
269
+ | <head>
270
+ | <body>
271
+ | <p>
272
+ | <button>
273
+ | <ol>
274
+
275
+ #data
276
+ <!doctype html><p><button><p>
277
+ #errors
278
+ (1,29): expected-closing-tag-but-got-eof
279
+ #document
280
+ | <!DOCTYPE html>
281
+ | <html>
282
+ | <head>
283
+ | <body>
284
+ | <p>
285
+ | <button>
286
+ | <p>
287
+
288
+ #data
289
+ <!doctype html><p><button><search>
290
+ #errors
291
+ (1,35): expected-closing-tag-but-got-eof
292
+ #document
293
+ | <!DOCTYPE html>
294
+ | <html>
295
+ | <head>
296
+ | <body>
297
+ | <p>
298
+ | <button>
299
+ | <search>
300
+
301
+ #data
302
+ <!doctype html><p><button><section>
303
+ #errors
304
+ (1,36): expected-closing-tag-but-got-eof
305
+ #document
306
+ | <!DOCTYPE html>
307
+ | <html>
308
+ | <head>
309
+ | <body>
310
+ | <p>
311
+ | <button>
312
+ | <section>
313
+
314
+ #data
315
+ <!doctype html><p><button><summary>
316
+ #errors
317
+ (1,36): expected-closing-tag-but-got-eof
318
+ #document
319
+ | <!DOCTYPE html>
320
+ | <html>
321
+ | <head>
322
+ | <body>
323
+ | <p>
324
+ | <button>
325
+ | <summary>
326
+
327
+ #data
328
+ <!doctype html><p><button><ul>
329
+ #errors
330
+ (1,30): expected-closing-tag-but-got-eof
331
+ #document
332
+ | <!DOCTYPE html>
333
+ | <html>
334
+ | <head>
335
+ | <body>
336
+ | <p>
337
+ | <button>
338
+ | <ul>
339
+
340
+ #data
341
+ <!doctype html><p><button><h1>
342
+ #errors
343
+ (1,30): expected-closing-tag-but-got-eof
344
+ #document
345
+ | <!DOCTYPE html>
346
+ | <html>
347
+ | <head>
348
+ | <body>
349
+ | <p>
350
+ | <button>
351
+ | <h1>
352
+
353
+ #data
354
+ <!doctype html><p><button><h6>
355
+ #errors
356
+ (1,30): expected-closing-tag-but-got-eof
357
+ #document
358
+ | <!DOCTYPE html>
359
+ | <html>
360
+ | <head>
361
+ | <body>
362
+ | <p>
363
+ | <button>
364
+ | <h6>
365
+
366
+ #data
367
+ <!doctype html><p><button><listing>
368
+ #errors
369
+ (1,35): expected-closing-tag-but-got-eof
370
+ #document
371
+ | <!DOCTYPE html>
372
+ | <html>
373
+ | <head>
374
+ | <body>
375
+ | <p>
376
+ | <button>
377
+ | <listing>
378
+
379
+ #data
380
+ <!doctype html><p><button><pre>
381
+ #errors
382
+ (1,31): expected-closing-tag-but-got-eof
383
+ #document
384
+ | <!DOCTYPE html>
385
+ | <html>
386
+ | <head>
387
+ | <body>
388
+ | <p>
389
+ | <button>
390
+ | <pre>
391
+
392
+ #data
393
+ <!doctype html><p><button><form>
394
+ #errors
395
+ (1,32): expected-closing-tag-but-got-eof
396
+ #document
397
+ | <!DOCTYPE html>
398
+ | <html>
399
+ | <head>
400
+ | <body>
401
+ | <p>
402
+ | <button>
403
+ | <form>
404
+
405
+ #data
406
+ <!doctype html><p><button><li>
407
+ #errors
408
+ (1,30): expected-closing-tag-but-got-eof
409
+ #document
410
+ | <!DOCTYPE html>
411
+ | <html>
412
+ | <head>
413
+ | <body>
414
+ | <p>
415
+ | <button>
416
+ | <li>
417
+
418
+ #data
419
+ <!doctype html><p><button><dd>
420
+ #errors
421
+ (1,30): expected-closing-tag-but-got-eof
422
+ #document
423
+ | <!DOCTYPE html>
424
+ | <html>
425
+ | <head>
426
+ | <body>
427
+ | <p>
428
+ | <button>
429
+ | <dd>
430
+
431
+ #data
432
+ <!doctype html><p><button><dt>
433
+ #errors
434
+ (1,30): expected-closing-tag-but-got-eof
435
+ #document
436
+ | <!DOCTYPE html>
437
+ | <html>
438
+ | <head>
439
+ | <body>
440
+ | <p>
441
+ | <button>
442
+ | <dt>
443
+
444
+ #data
445
+ <!doctype html><p><button><plaintext>
446
+ #errors
447
+ (1,37): expected-closing-tag-but-got-eof
448
+ #document
449
+ | <!DOCTYPE html>
450
+ | <html>
451
+ | <head>
452
+ | <body>
453
+ | <p>
454
+ | <button>
455
+ | <plaintext>
456
+
457
+ #data
458
+ <!doctype html><p><button><table>
459
+ #errors
460
+ (1,33): eof-in-table
461
+ #document
462
+ | <!DOCTYPE html>
463
+ | <html>
464
+ | <head>
465
+ | <body>
466
+ | <p>
467
+ | <button>
468
+ | <table>
469
+
470
+ #data
471
+ <!doctype html><p><button><hr>
472
+ #errors
473
+ (1,30): expected-closing-tag-but-got-eof
474
+ #document
475
+ | <!DOCTYPE html>
476
+ | <html>
477
+ | <head>
478
+ | <body>
479
+ | <p>
480
+ | <button>
481
+ | <hr>
482
+
483
+ #data
484
+ <!doctype html><p><button><xmp>
485
+ #errors
486
+ (1,31): expected-named-closing-tag-but-got-eof
487
+ (1,31): expected-closing-tag-but-got-eof
488
+ #document
489
+ | <!DOCTYPE html>
490
+ | <html>
491
+ | <head>
492
+ | <body>
493
+ | <p>
494
+ | <button>
495
+ | <xmp>
496
+
497
+ #data
498
+ <!doctype html><p><button></p>
499
+ #errors
500
+ (1,30): unexpected-end-tag
501
+ (1,30): expected-closing-tag-but-got-eof
502
+ #document
503
+ | <!DOCTYPE html>
504
+ | <html>
505
+ | <head>
506
+ | <body>
507
+ | <p>
508
+ | <button>
509
+ | <p>
510
+
511
+ #data
512
+ <!doctype html><button><p></button>x
513
+ #errors
514
+ #document
515
+ | <!DOCTYPE html>
516
+ | <html>
517
+ | <head>
518
+ | <body>
519
+ | <button>
520
+ | <p>
521
+ | "x"
522
+
523
+ #data
524
+ <!doctype html><address><button></address>a
525
+ #errors
526
+ (1,42): end-tag-too-early
527
+ #document
528
+ | <!DOCTYPE html>
529
+ | <html>
530
+ | <head>
531
+ | <body>
532
+ | <address>
533
+ | <button>
534
+ | "a"
535
+
536
+ #data
537
+ <p><table></p>
538
+ #errors
539
+ (1,3): expected-doctype-but-got-start-tag
540
+ (1,14): unexpected-end-tag-implies-table-voodoo
541
+ (1,14): unexpected-end-tag
542
+ (1,14): eof-in-table
543
+ #document
544
+ | <html>
545
+ | <head>
546
+ | <body>
547
+ | <p>
548
+ | <p>
549
+ | <table>
550
+
551
+ #data
552
+ <!doctype html><svg>
553
+ #errors
554
+ (1,20): expected-closing-tag-but-got-eof
555
+ #document
556
+ | <!DOCTYPE html>
557
+ | <html>
558
+ | <head>
559
+ | <body>
560
+ | <svg svg>
561
+
562
+ #data
563
+ <!doctype html><p><figcaption>
564
+ #errors
565
+ (1,30): expected-closing-tag-but-got-eof
566
+ #document
567
+ | <!DOCTYPE html>
568
+ | <html>
569
+ | <head>
570
+ | <body>
571
+ | <p>
572
+ | <figcaption>
573
+
574
+ #data
575
+ <!doctype html><p><summary>
576
+ #errors
577
+ (1,27): expected-closing-tag-but-got-eof
578
+ #document
579
+ | <!DOCTYPE html>
580
+ | <html>
581
+ | <head>
582
+ | <body>
583
+ | <p>
584
+ | <summary>
585
+
586
+ #data
587
+ <!doctype html><form><table><form>
588
+ #errors
589
+ (1,34): unexpected-form-in-table
590
+ (1,34): eof-in-table
591
+ #document
592
+ | <!DOCTYPE html>
593
+ | <html>
594
+ | <head>
595
+ | <body>
596
+ | <form>
597
+ | <table>
598
+
599
+ #data
600
+ <!doctype html><table><form><form>
601
+ #errors
602
+ (1,28): unexpected-form-in-table
603
+ (1,34): unexpected-form-in-table
604
+ (1,34): eof-in-table
605
+ #document
606
+ | <!DOCTYPE html>
607
+ | <html>
608
+ | <head>
609
+ | <body>
610
+ | <table>
611
+ | <form>
612
+
613
+ #data
614
+ <!doctype html><table><form></table><form>
615
+ #errors
616
+ (1,28): unexpected-form-in-table
617
+ (1,42): unexpected-start-tag
618
+ #document
619
+ | <!DOCTYPE html>
620
+ | <html>
621
+ | <head>
622
+ | <body>
623
+ | <table>
624
+ | <form>
625
+
626
+ #data
627
+ <!doctype html><svg><foreignObject><p>
628
+ #errors
629
+ (1,38): expected-closing-tag-but-got-eof
630
+ #document
631
+ | <!DOCTYPE html>
632
+ | <html>
633
+ | <head>
634
+ | <body>
635
+ | <svg svg>
636
+ | <svg foreignObject>
637
+ | <p>
638
+
639
+ #data
640
+ <!doctype html><svg><title>abc
641
+ #errors
642
+ (1,30): expected-closing-tag-but-got-eof
643
+ #document
644
+ | <!DOCTYPE html>
645
+ | <html>
646
+ | <head>
647
+ | <body>
648
+ | <svg svg>
649
+ | <svg title>
650
+ | "abc"
651
+
652
+ #data
653
+ <option><span><option>
654
+ #errors
655
+ (1,8): expected-doctype-but-got-start-tag
656
+ (1,22): expected-closing-tag-but-got-eof
657
+ #document
658
+ | <html>
659
+ | <head>
660
+ | <body>
661
+ | <option>
662
+ | <span>
663
+ | <option>
664
+
665
+ #data
666
+ <option><option>
667
+ #errors
668
+ (1,8): expected-doctype-but-got-start-tag
669
+ #document
670
+ | <html>
671
+ | <head>
672
+ | <body>
673
+ | <option>
674
+ | <option>
675
+
676
+ #data
677
+ <math><annotation-xml><div>
678
+ #errors
679
+ (1,6): expected-doctype-but-got-start-tag
680
+ (1,27): unexpected-html-element-in-foreign-content
681
+ (1,27): expected-closing-tag-but-got-eof
682
+ #document
683
+ | <html>
684
+ | <head>
685
+ | <body>
686
+ | <math math>
687
+ | <math annotation-xml>
688
+ | <div>
689
+
690
+ #data
691
+ <math><annotation-xml encoding="application/svg+xml"><div>
692
+ #errors
693
+ (1,6): expected-doctype-but-got-start-tag
694
+ (1,58): unexpected-html-element-in-foreign-content
695
+ (1,58): expected-closing-tag-but-got-eof
696
+ #document
697
+ | <html>
698
+ | <head>
699
+ | <body>
700
+ | <math math>
701
+ | <math annotation-xml>
702
+ | encoding="application/svg+xml"
703
+ | <div>
704
+
705
+ #data
706
+ <math><annotation-xml encoding="application/xhtml+xml"><div>
707
+ #errors
708
+ (1,6): expected-doctype-but-got-start-tag
709
+ (1,60): expected-closing-tag-but-got-eof
710
+ #document
711
+ | <html>
712
+ | <head>
713
+ | <body>
714
+ | <math math>
715
+ | <math annotation-xml>
716
+ | encoding="application/xhtml+xml"
717
+ | <div>
718
+
719
+ #data
720
+ <math><annotation-xml encoding="aPPlication/xhtmL+xMl"><div>
721
+ #errors
722
+ (1,6): expected-doctype-but-got-start-tag
723
+ (1,60): expected-closing-tag-but-got-eof
724
+ #document
725
+ | <html>
726
+ | <head>
727
+ | <body>
728
+ | <math math>
729
+ | <math annotation-xml>
730
+ | encoding="aPPlication/xhtmL+xMl"
731
+ | <div>
732
+
733
+ #data
734
+ <math><annotation-xml encoding="text/html"><div>
735
+ #errors
736
+ (1,6): expected-doctype-but-got-start-tag
737
+ (1,48): expected-closing-tag-but-got-eof
738
+ #document
739
+ | <html>
740
+ | <head>
741
+ | <body>
742
+ | <math math>
743
+ | <math annotation-xml>
744
+ | encoding="text/html"
745
+ | <div>
746
+
747
+ #data
748
+ <math><annotation-xml encoding="Text/htmL"><div>
749
+ #errors
750
+ (1,6): expected-doctype-but-got-start-tag
751
+ (1,48): expected-closing-tag-but-got-eof
752
+ #document
753
+ | <html>
754
+ | <head>
755
+ | <body>
756
+ | <math math>
757
+ | <math annotation-xml>
758
+ | encoding="Text/htmL"
759
+ | <div>
760
+
761
+ #data
762
+ <math><annotation-xml encoding=" text/html "><div>
763
+ #errors
764
+ (1,6): expected-doctype-but-got-start-tag
765
+ (1,50): unexpected-html-element-in-foreign-content
766
+ (1,50): expected-closing-tag-but-got-eof
767
+ #document
768
+ | <html>
769
+ | <head>
770
+ | <body>
771
+ | <math math>
772
+ | <math annotation-xml>
773
+ | encoding=" text/html "
774
+ | <div>
775
+
776
+ #data
777
+ <math><annotation-xml> </annotation-xml>
778
+ #errors
779
+ (1,6): expected-doctype-but-got-start-tag
780
+ (1,40): expected-closing-tag-but-got-eof
781
+ #document
782
+ | <html>
783
+ | <head>
784
+ | <body>
785
+ | <math math>
786
+ | <math annotation-xml>
787
+ | " "
788
+
789
+ #data
790
+ <math><annotation-xml>c</annotation-xml>
791
+ #errors
792
+ (1,6): expected-doctype-but-got-start-tag
793
+ (1,40): expected-closing-tag-but-got-eof
794
+ #document
795
+ | <html>
796
+ | <head>
797
+ | <body>
798
+ | <math math>
799
+ | <math annotation-xml>
800
+ | "c"
801
+
802
+ #data
803
+ <math><annotation-xml><!--foo-->
804
+ #errors
805
+ (1,6): expected-doctype-but-got-start-tag
806
+ (1,32): expected-closing-tag-but-got-eof
807
+ #document
808
+ | <html>
809
+ | <head>
810
+ | <body>
811
+ | <math math>
812
+ | <math annotation-xml>
813
+ | <!-- foo -->
814
+
815
+ #data
816
+ <math><annotation-xml></svg>x
817
+ #errors
818
+ (1,6): expected-doctype-but-got-start-tag
819
+ (1,28): unexpected-end-tag-in-math
820
+ (1,28): unexpected-end-tag
821
+ (1,29): expected-closing-tag-but-got-eof
822
+ #document
823
+ | <html>
824
+ | <head>
825
+ | <body>
826
+ | <math math>
827
+ | <math annotation-xml>
828
+ | "x"
829
+
830
+ #data
831
+ <math><annotation-xml><svg>x
832
+ #errors
833
+ (1,6): expected-doctype-but-got-start-tag
834
+ (1,28): expected-closing-tag-but-got-eof
835
+ #document
836
+ | <html>
837
+ | <head>
838
+ | <body>
839
+ | <math math>
840
+ | <math annotation-xml>
841
+ | <svg svg>
842
+ | "x"