@tkeron/html-parser 0.1.7 → 1.1.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.
- package/README.md +1 -7
- package/bun.lock +5 -0
- package/index.ts +4 -0
- package/package.json +7 -1
- package/src/css-selector.ts +1 -1
- package/src/dom-simulator.ts +41 -17
- package/src/encoding.ts +39 -0
- package/src/index.ts +9 -0
- package/src/parser.ts +509 -143
- package/src/serializer.ts +450 -0
- package/src/tokenizer.ts +190 -118
- package/tests/advanced.test.ts +121 -108
- package/tests/custom-elements-head.test.ts +105 -0
- package/tests/dom-extended.test.ts +12 -12
- package/tests/dom-manipulation.test.ts +9 -10
- package/tests/dom.test.ts +32 -27
- package/tests/helpers/tokenizer-adapter.test.ts +70 -0
- package/tests/helpers/tokenizer-adapter.ts +65 -0
- package/tests/helpers/tree-adapter.test.ts +39 -0
- package/tests/helpers/tree-adapter.ts +60 -0
- package/tests/html5lib-data/tokenizer/namedEntities.test +42422 -0
- package/tests/html5lib-data/tokenizer/pendingSpecChanges.test +9 -0
- package/tests/html5lib-data/tree-construction/adoption01.dat +354 -0
- package/tests/html5lib-data/tree-construction/adoption02.dat +39 -0
- package/tests/html5lib-data/tree-construction/domjs-unsafe.dat +0 -0
- package/tests/html5lib-data/tree-construction/entities02.dat +309 -0
- package/tests/html5lib-data/tree-construction/html5test-com.dat +301 -0
- package/tests/html5lib-data/tree-construction/math.dat +104 -0
- package/tests/html5lib-data/tree-construction/namespace-sensitivity.dat +22 -0
- package/tests/html5lib-data/tree-construction/noscript01.dat +237 -0
- package/tests/html5lib-data/tree-construction/ruby.dat +302 -0
- package/tests/html5lib-data/tree-construction/scriptdata01.dat +372 -0
- package/tests/html5lib-data/tree-construction/svg.dat +104 -0
- package/tests/html5lib-data/tree-construction/template.dat +1673 -0
- package/tests/html5lib-data/tree-construction/tests10.dat +853 -0
- package/tests/html5lib-data/tree-construction/tests11.dat +523 -0
- package/tests/html5lib-data/tree-construction/tests20.dat +842 -0
- package/tests/html5lib-data/tree-construction/tests21.dat +306 -0
- package/tests/html5lib-data/tree-construction/tests23.dat +168 -0
- package/tests/html5lib-data/tree-construction/tests24.dat +79 -0
- package/tests/html5lib-data/tree-construction/tests5.dat +210 -0
- package/tests/html5lib-data/tree-construction/tests6.dat +663 -0
- package/tests/html5lib-data/tree-construction/tests_innerHTML_1.dat +844 -0
- package/tests/parser.test.ts +173 -193
- package/tests/serializer-core.test.ts +16 -0
- package/tests/serializer-data/core.test +125 -0
- package/tests/serializer-data/injectmeta.test +66 -0
- package/tests/serializer-data/optionaltags.test +965 -0
- package/tests/serializer-data/options.test +60 -0
- package/tests/serializer-data/whitespace.test +51 -0
- package/tests/serializer-injectmeta.test.ts +16 -0
- package/tests/serializer-optionaltags.test.ts +16 -0
- package/tests/serializer-options.test.ts +16 -0
- package/tests/serializer-whitespace.test.ts +16 -0
- package/tests/tokenizer-namedEntities.test.ts +20 -0
- package/tests/tokenizer-pendingSpecChanges.test.ts +20 -0
- package/tests/tokenizer.test.ts +25 -32
- package/tests/tree-construction-adoption01.test.ts +37 -0
- package/tests/tree-construction-adoption02.test.ts +34 -0
- package/tests/tree-construction-domjs-unsafe.test.ts +24 -0
- package/tests/tree-construction-entities02.test.ts +33 -0
- package/tests/tree-construction-html5test-com.test.ts +32 -0
- package/tests/tree-construction-math.test.ts +18 -0
- package/tests/tree-construction-namespace-sensitivity.test.ts +18 -0
- package/tests/tree-construction-noscript01.test.ts +18 -0
- package/tests/tree-construction-ruby.test.ts +21 -0
- package/tests/tree-construction-scriptdata01.test.ts +21 -0
- package/tests/tree-construction-svg.test.ts +21 -0
- package/tests/tree-construction-template.test.ts +21 -0
- package/tests/tree-construction-tests10.test.ts +21 -0
- package/tests/tree-construction-tests11.test.ts +21 -0
- package/tests/tree-construction-tests20.test.ts +18 -0
- package/tests/tree-construction-tests21.test.ts +18 -0
- package/tests/tree-construction-tests23.test.ts +18 -0
- package/tests/tree-construction-tests24.test.ts +18 -0
- package/tests/tree-construction-tests5.test.ts +21 -0
- package/tests/tree-construction-tests6.test.ts +21 -0
- package/tests/tree-construction-tests_innerHTML_1.test.ts +21 -0
- package/tests/custom-elements.test.ts +0 -745
- package/tests/official/README.md +0 -87
- package/tests/official/acid/acid-tests.test.ts +0 -309
- package/tests/official/final-output/final-output.test.ts +0 -361
- package/tests/official/html5lib/tokenizer-utils.ts +0 -192
- package/tests/official/html5lib/tokenizer.test.ts +0 -171
- package/tests/official/html5lib/tree-construction-utils.ts +0 -194
- package/tests/official/html5lib/tree-construction.test.ts +0 -250
- package/tests/official/validator/validator-tests.test.ts +0 -237
- package/tests/official/validator-nu/validator-nu.test.ts +0 -335
- package/tests/official/whatwg/whatwg-tests.test.ts +0 -205
- package/tests/official/wpt/wpt-tests.test.ts +0 -409
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
#data
|
|
2
|
+
<svg><tr><td><title><tr>
|
|
3
|
+
#errors
|
|
4
|
+
(1:21) Unexpected <tr> tag
|
|
5
|
+
(1:25) Unexpected EOF
|
|
6
|
+
#document-fragment
|
|
7
|
+
td
|
|
8
|
+
#document
|
|
9
|
+
| <svg svg>
|
|
10
|
+
| <svg tr>
|
|
11
|
+
| <svg td>
|
|
12
|
+
| <svg title>
|
|
13
|
+
|
|
14
|
+
#data
|
|
15
|
+
<svg><tr><td><title><tr>
|
|
16
|
+
#errors
|
|
17
|
+
(1:1) Unexpected <svg> tag
|
|
18
|
+
(1:21) Unexpected <tr> tag
|
|
19
|
+
(1:25) Unexpected EOF
|
|
20
|
+
#document-fragment
|
|
21
|
+
tr
|
|
22
|
+
#document
|
|
23
|
+
| <svg svg>
|
|
24
|
+
| <svg tr>
|
|
25
|
+
| <svg td>
|
|
26
|
+
| <svg title>
|
|
27
|
+
|
|
28
|
+
#data
|
|
29
|
+
<svg><thead><title><tbody>
|
|
30
|
+
#errors
|
|
31
|
+
(1:1) Unexpected <svg> tag
|
|
32
|
+
(1:20) Unexpected <tbody> tag
|
|
33
|
+
(1:27) Unexpected EOF
|
|
34
|
+
#document-fragment
|
|
35
|
+
thead
|
|
36
|
+
#document
|
|
37
|
+
| <svg svg>
|
|
38
|
+
| <svg thead>
|
|
39
|
+
| <svg title>
|
|
40
|
+
|
|
41
|
+
#data
|
|
42
|
+
<svg><tfoot><title><tbody>
|
|
43
|
+
#errors
|
|
44
|
+
(1:1) Unexpected <svg> tag
|
|
45
|
+
(1:20) Unexpected <tbody> tag
|
|
46
|
+
(1:27) Unexpected EOF
|
|
47
|
+
#document-fragment
|
|
48
|
+
tfoot
|
|
49
|
+
#document
|
|
50
|
+
| <svg svg>
|
|
51
|
+
| <svg tfoot>
|
|
52
|
+
| <svg title>
|
|
53
|
+
|
|
54
|
+
#data
|
|
55
|
+
<svg><tbody><title><tfoot>
|
|
56
|
+
#errors
|
|
57
|
+
(1:1) Unexpected <svg> tag
|
|
58
|
+
(1:20) Unexpected <tfoot> tag
|
|
59
|
+
(1:27) Unexpected EOF
|
|
60
|
+
#document-fragment
|
|
61
|
+
tbody
|
|
62
|
+
#document
|
|
63
|
+
| <svg svg>
|
|
64
|
+
| <svg tbody>
|
|
65
|
+
| <svg title>
|
|
66
|
+
|
|
67
|
+
#data
|
|
68
|
+
<svg><tbody><title></table>
|
|
69
|
+
#errors
|
|
70
|
+
(1:1) Unexpected <svg> tag
|
|
71
|
+
(1:20) Unexpected </table> tag
|
|
72
|
+
(1:28) Unexpected EOF
|
|
73
|
+
#document-fragment
|
|
74
|
+
tbody
|
|
75
|
+
#document
|
|
76
|
+
| <svg svg>
|
|
77
|
+
| <svg tbody>
|
|
78
|
+
| <svg title>
|
|
79
|
+
|
|
80
|
+
#data
|
|
81
|
+
<svg><thead><title></table>
|
|
82
|
+
#errors
|
|
83
|
+
(1:1) Unexpected <svg> tag
|
|
84
|
+
(1:20) Unexpected </table> tag
|
|
85
|
+
(1:28) Unexpected EOF
|
|
86
|
+
#document-fragment
|
|
87
|
+
tbody
|
|
88
|
+
#document
|
|
89
|
+
| <svg svg>
|
|
90
|
+
| <svg thead>
|
|
91
|
+
| <svg title>
|
|
92
|
+
|
|
93
|
+
#data
|
|
94
|
+
<svg><tfoot><title></table>
|
|
95
|
+
#errors
|
|
96
|
+
(1:1) Unexpected <svg> tag
|
|
97
|
+
(1:20) Unexpected </table> tag
|
|
98
|
+
(1:28) Unexpected EOF
|
|
99
|
+
#document-fragment
|
|
100
|
+
tbody
|
|
101
|
+
#document
|
|
102
|
+
| <svg svg>
|
|
103
|
+
| <svg tfoot>
|
|
104
|
+
| <svg title>
|