@tkeron/html-parser 0.1.5 → 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.
- package/README.md +1 -7
- package/bun.lock +8 -3
- package/index.ts +4 -0
- package/package.json +13 -6
- package/src/css-selector.ts +45 -27
- package/src/dom-simulator.ts +162 -20
- package/src/encoding.ts +39 -0
- package/src/index.ts +9 -0
- package/src/parser.ts +478 -183
- package/src/serializer.ts +450 -0
- package/src/tokenizer.ts +59 -139
- package/tests/advanced.test.ts +119 -106
- package/tests/custom-elements.test.ts +172 -162
- package/tests/dom-extended.test.ts +12 -12
- package/tests/dom-manipulation.test.ts +637 -0
- 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 +43 -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 +172 -193
- package/tests/selectors.test.ts +64 -1
- 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 +83 -0
- 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 +24 -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/void-elements.test.ts +471 -0
- 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,965 @@
|
|
|
1
|
+
{"tests": [
|
|
2
|
+
|
|
3
|
+
{"description": "html start-tag followed by text, with attributes",
|
|
4
|
+
"input": [["StartTag", "http://www.w3.org/1999/xhtml", "html", [{"namespace": null, "name": "lang", "value": "en"}]], ["Characters", "foo"]],
|
|
5
|
+
"expected": ["<html lang=en>foo"]
|
|
6
|
+
},
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
{"description": "html start-tag followed by comment",
|
|
11
|
+
"input": [["StartTag", "http://www.w3.org/1999/xhtml", "html", {}], ["Comment", "foo"]],
|
|
12
|
+
"expected": ["<html><!--foo-->"]
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
{"description": "html start-tag followed by space character",
|
|
16
|
+
"input": [["StartTag", "http://www.w3.org/1999/xhtml", "html", {}], ["Characters", " foo"]],
|
|
17
|
+
"expected": ["<html> foo"]
|
|
18
|
+
},
|
|
19
|
+
|
|
20
|
+
{"description": "html start-tag followed by text",
|
|
21
|
+
"input": [["StartTag", "http://www.w3.org/1999/xhtml", "html", {}], ["Characters", "foo"]],
|
|
22
|
+
"expected": ["foo"]
|
|
23
|
+
},
|
|
24
|
+
|
|
25
|
+
{"description": "html start-tag followed by start-tag",
|
|
26
|
+
"input": [["StartTag", "http://www.w3.org/1999/xhtml", "html", {}], ["StartTag", "http://www.w3.org/1999/xhtml", "foo", {}]],
|
|
27
|
+
"expected": ["<foo>"]
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
{"description": "html start-tag followed by end-tag",
|
|
31
|
+
"input": [["StartTag", "http://www.w3.org/1999/xhtml", "html", {}], ["EndTag", "http://www.w3.org/1999/xhtml", "foo"]],
|
|
32
|
+
"expected": ["</foo>"]
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
{"description": "html start-tag at EOF (shouldn't ever happen?!)",
|
|
36
|
+
"input": [["StartTag", "http://www.w3.org/1999/xhtml", "html", {}]],
|
|
37
|
+
"expected": [""]
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
{"description": "html end-tag followed by comment",
|
|
43
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "html"], ["Comment", "foo"]],
|
|
44
|
+
"expected": ["</html><!--foo-->"]
|
|
45
|
+
},
|
|
46
|
+
|
|
47
|
+
{"description": "html end-tag followed by space character",
|
|
48
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "html"], ["Characters", " foo"]],
|
|
49
|
+
"expected": ["</html> foo"]
|
|
50
|
+
},
|
|
51
|
+
|
|
52
|
+
{"description": "html end-tag followed by text",
|
|
53
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "html"], ["Characters", "foo"]],
|
|
54
|
+
"expected": ["foo"]
|
|
55
|
+
},
|
|
56
|
+
|
|
57
|
+
{"description": "html end-tag followed by start-tag",
|
|
58
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "html"], ["StartTag", "http://www.w3.org/1999/xhtml", "foo", {}]],
|
|
59
|
+
"expected": ["<foo>"]
|
|
60
|
+
},
|
|
61
|
+
|
|
62
|
+
{"description": "html end-tag followed by end-tag",
|
|
63
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "html"], ["EndTag", "http://www.w3.org/1999/xhtml", "foo"]],
|
|
64
|
+
"expected": ["</foo>"]
|
|
65
|
+
},
|
|
66
|
+
|
|
67
|
+
{"description": "html end-tag at EOF",
|
|
68
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "html"]],
|
|
69
|
+
"expected": [""]
|
|
70
|
+
},
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
{"description": "head start-tag followed by comment",
|
|
76
|
+
"input": [["StartTag", "http://www.w3.org/1999/xhtml", "head", {}], ["Comment", "foo"]],
|
|
77
|
+
"expected": ["<head><!--foo-->"]
|
|
78
|
+
},
|
|
79
|
+
|
|
80
|
+
{"description": "head start-tag followed by space character",
|
|
81
|
+
"input": [["StartTag", "http://www.w3.org/1999/xhtml", "head", {}], ["Characters", " foo"]],
|
|
82
|
+
"expected": ["<head> foo"]
|
|
83
|
+
},
|
|
84
|
+
|
|
85
|
+
{"description": "head start-tag followed by text",
|
|
86
|
+
"input": [["StartTag", "http://www.w3.org/1999/xhtml", "head", {}], ["Characters", "foo"]],
|
|
87
|
+
"expected": ["<head>foo"]
|
|
88
|
+
},
|
|
89
|
+
|
|
90
|
+
{"description": "head start-tag followed by start-tag",
|
|
91
|
+
"input": [["StartTag", "http://www.w3.org/1999/xhtml", "head", {}], ["StartTag", "http://www.w3.org/1999/xhtml", "foo", {}]],
|
|
92
|
+
"expected": ["<foo>"]
|
|
93
|
+
},
|
|
94
|
+
|
|
95
|
+
{"description": "head start-tag followed by end-tag (shouldn't ever happen?!)",
|
|
96
|
+
"input": [["StartTag", "http://www.w3.org/1999/xhtml", "head", {}], ["EndTag", "http://www.w3.org/1999/xhtml", "foo"]],
|
|
97
|
+
"expected": ["<head></foo>", "</foo>"]
|
|
98
|
+
},
|
|
99
|
+
|
|
100
|
+
{"description": "empty head element",
|
|
101
|
+
"input": [["StartTag", "http://www.w3.org/1999/xhtml", "head", {}], ["EndTag", "http://www.w3.org/1999/xhtml", "head"]],
|
|
102
|
+
"expected": [""]
|
|
103
|
+
},
|
|
104
|
+
|
|
105
|
+
{"description": "head start-tag followed by empty-tag",
|
|
106
|
+
"input": [["StartTag", "http://www.w3.org/1999/xhtml", "head", {}], ["EmptyTag", "foo", {}]],
|
|
107
|
+
"expected": ["<foo>"]
|
|
108
|
+
},
|
|
109
|
+
|
|
110
|
+
{"description": "head start-tag at EOF (shouldn't ever happen?!)",
|
|
111
|
+
"input": [["StartTag", "http://www.w3.org/1999/xhtml", "head", {}]],
|
|
112
|
+
"expected": ["<head>", ""]
|
|
113
|
+
},
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
{"description": "head end-tag followed by comment",
|
|
118
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "head"], ["Comment", "foo"]],
|
|
119
|
+
"expected": ["</head><!--foo-->"]
|
|
120
|
+
},
|
|
121
|
+
|
|
122
|
+
{"description": "head end-tag followed by space character",
|
|
123
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "head"], ["Characters", " foo"]],
|
|
124
|
+
"expected": ["</head> foo"]
|
|
125
|
+
},
|
|
126
|
+
|
|
127
|
+
{"description": "head end-tag followed by text",
|
|
128
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "head"], ["Characters", "foo"]],
|
|
129
|
+
"expected": ["foo"]
|
|
130
|
+
},
|
|
131
|
+
|
|
132
|
+
{"description": "head end-tag followed by start-tag",
|
|
133
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "head"], ["StartTag", "http://www.w3.org/1999/xhtml", "foo", {}]],
|
|
134
|
+
"expected": ["<foo>"]
|
|
135
|
+
},
|
|
136
|
+
|
|
137
|
+
{"description": "head end-tag followed by end-tag",
|
|
138
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "head"], ["EndTag", "http://www.w3.org/1999/xhtml", "foo"]],
|
|
139
|
+
"expected": ["</foo>"]
|
|
140
|
+
},
|
|
141
|
+
|
|
142
|
+
{"description": "head end-tag at EOF",
|
|
143
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "head"]],
|
|
144
|
+
"expected": [""]
|
|
145
|
+
},
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
{"description": "body start-tag followed by comment",
|
|
151
|
+
"input": [["StartTag", "http://www.w3.org/1999/xhtml", "body", {}], ["Comment", "foo"]],
|
|
152
|
+
"expected": ["<body><!--foo-->"]
|
|
153
|
+
},
|
|
154
|
+
|
|
155
|
+
{"description": "body start-tag followed by space character",
|
|
156
|
+
"input": [["StartTag", "http://www.w3.org/1999/xhtml", "body", {}], ["Characters", " foo"]],
|
|
157
|
+
"expected": ["<body> foo"]
|
|
158
|
+
},
|
|
159
|
+
|
|
160
|
+
{"description": "body start-tag followed by text",
|
|
161
|
+
"input": [["StartTag", "http://www.w3.org/1999/xhtml", "body", {}], ["Characters", "foo"]],
|
|
162
|
+
"expected": ["foo"]
|
|
163
|
+
},
|
|
164
|
+
|
|
165
|
+
{"description": "body start-tag followed by start-tag",
|
|
166
|
+
"input": [["StartTag", "http://www.w3.org/1999/xhtml", "body", {}], ["StartTag", "http://www.w3.org/1999/xhtml", "foo", {}]],
|
|
167
|
+
"expected": ["<foo>"]
|
|
168
|
+
},
|
|
169
|
+
|
|
170
|
+
{"description": "body start-tag followed by end-tag",
|
|
171
|
+
"input": [["StartTag", "http://www.w3.org/1999/xhtml", "body", {}], ["EndTag", "http://www.w3.org/1999/xhtml", "foo"]],
|
|
172
|
+
"expected": ["</foo>"]
|
|
173
|
+
},
|
|
174
|
+
|
|
175
|
+
{"description": "body start-tag at EOF (shouldn't ever happen?!)",
|
|
176
|
+
"input": [["StartTag", "http://www.w3.org/1999/xhtml", "body", {}]],
|
|
177
|
+
"expected": [""]
|
|
178
|
+
},
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
{"description": "body end-tag followed by comment",
|
|
183
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "body"], ["Comment", "foo"]],
|
|
184
|
+
"expected": ["</body><!--foo-->"]
|
|
185
|
+
},
|
|
186
|
+
|
|
187
|
+
{"description": "body end-tag followed by space character",
|
|
188
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "body"], ["Characters", " foo"]],
|
|
189
|
+
"expected": ["</body> foo"]
|
|
190
|
+
},
|
|
191
|
+
|
|
192
|
+
{"description": "body end-tag followed by text",
|
|
193
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "body"], ["Characters", "foo"]],
|
|
194
|
+
"expected": ["foo"]
|
|
195
|
+
},
|
|
196
|
+
|
|
197
|
+
{"description": "body end-tag followed by start-tag",
|
|
198
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "body"], ["StartTag", "http://www.w3.org/1999/xhtml", "foo", {}]],
|
|
199
|
+
"expected": ["<foo>"]
|
|
200
|
+
},
|
|
201
|
+
|
|
202
|
+
{"description": "body end-tag followed by end-tag",
|
|
203
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "body"], ["EndTag", "http://www.w3.org/1999/xhtml", "foo"]],
|
|
204
|
+
"expected": ["</foo>"]
|
|
205
|
+
},
|
|
206
|
+
|
|
207
|
+
{"description": "body end-tag at EOF",
|
|
208
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "body"]],
|
|
209
|
+
"expected": [""]
|
|
210
|
+
},
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
{"description": "li end-tag followed by comment",
|
|
216
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "li"], ["Comment", "foo"]],
|
|
217
|
+
"expected": ["</li><!--foo-->"]
|
|
218
|
+
},
|
|
219
|
+
|
|
220
|
+
{"description": "li end-tag followed by space character",
|
|
221
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "li"], ["Characters", " foo"]],
|
|
222
|
+
"expected": ["</li> foo"]
|
|
223
|
+
},
|
|
224
|
+
|
|
225
|
+
{"description": "li end-tag followed by text",
|
|
226
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "li"], ["Characters", "foo"]],
|
|
227
|
+
"expected": ["</li>foo"]
|
|
228
|
+
},
|
|
229
|
+
|
|
230
|
+
{"description": "li end-tag followed by start-tag",
|
|
231
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "li"], ["StartTag", "http://www.w3.org/1999/xhtml", "foo", {}]],
|
|
232
|
+
"expected": ["</li><foo>"]
|
|
233
|
+
},
|
|
234
|
+
|
|
235
|
+
{"description": "li end-tag followed by li start-tag",
|
|
236
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "li"], ["StartTag", "http://www.w3.org/1999/xhtml", "li", {}]],
|
|
237
|
+
"expected": ["<li>"]
|
|
238
|
+
},
|
|
239
|
+
|
|
240
|
+
{"description": "li end-tag followed by end-tag",
|
|
241
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "li"], ["EndTag", "http://www.w3.org/1999/xhtml", "foo"]],
|
|
242
|
+
"expected": ["</foo>"]
|
|
243
|
+
},
|
|
244
|
+
|
|
245
|
+
{"description": "li end-tag at EOF",
|
|
246
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "li"]],
|
|
247
|
+
"expected": [""]
|
|
248
|
+
},
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
{"description": "dt end-tag followed by comment",
|
|
254
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "dt"], ["Comment", "foo"]],
|
|
255
|
+
"expected": ["</dt><!--foo-->"]
|
|
256
|
+
},
|
|
257
|
+
|
|
258
|
+
{"description": "dt end-tag followed by space character",
|
|
259
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "dt"], ["Characters", " foo"]],
|
|
260
|
+
"expected": ["</dt> foo"]
|
|
261
|
+
},
|
|
262
|
+
|
|
263
|
+
{"description": "dt end-tag followed by text",
|
|
264
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "dt"], ["Characters", "foo"]],
|
|
265
|
+
"expected": ["</dt>foo"]
|
|
266
|
+
},
|
|
267
|
+
|
|
268
|
+
{"description": "dt end-tag followed by start-tag",
|
|
269
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "dt"], ["StartTag", "http://www.w3.org/1999/xhtml", "foo", {}]],
|
|
270
|
+
"expected": ["</dt><foo>"]
|
|
271
|
+
},
|
|
272
|
+
|
|
273
|
+
{"description": "dt end-tag followed by dt start-tag",
|
|
274
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "dt"], ["StartTag", "http://www.w3.org/1999/xhtml", "dt", {}]],
|
|
275
|
+
"expected": ["<dt>"]
|
|
276
|
+
},
|
|
277
|
+
|
|
278
|
+
{"description": "dt end-tag followed by dd start-tag",
|
|
279
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "dt"], ["StartTag", "http://www.w3.org/1999/xhtml", "dd", {}]],
|
|
280
|
+
"expected": ["<dd>"]
|
|
281
|
+
},
|
|
282
|
+
|
|
283
|
+
{"description": "dt end-tag followed by end-tag",
|
|
284
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "dt"], ["EndTag", "http://www.w3.org/1999/xhtml", "foo"]],
|
|
285
|
+
"expected": ["</dt></foo>"]
|
|
286
|
+
},
|
|
287
|
+
|
|
288
|
+
{"description": "dt end-tag at EOF",
|
|
289
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "dt"]],
|
|
290
|
+
"expected": ["</dt>"]
|
|
291
|
+
},
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
{"description": "dd end-tag followed by comment",
|
|
297
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "dd"], ["Comment", "foo"]],
|
|
298
|
+
"expected": ["</dd><!--foo-->"]
|
|
299
|
+
},
|
|
300
|
+
|
|
301
|
+
{"description": "dd end-tag followed by space character",
|
|
302
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "dd"], ["Characters", " foo"]],
|
|
303
|
+
"expected": ["</dd> foo"]
|
|
304
|
+
},
|
|
305
|
+
|
|
306
|
+
{"description": "dd end-tag followed by text",
|
|
307
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "dd"], ["Characters", "foo"]],
|
|
308
|
+
"expected": ["</dd>foo"]
|
|
309
|
+
},
|
|
310
|
+
|
|
311
|
+
{"description": "dd end-tag followed by start-tag",
|
|
312
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "dd"], ["StartTag", "http://www.w3.org/1999/xhtml", "foo", {}]],
|
|
313
|
+
"expected": ["</dd><foo>"]
|
|
314
|
+
},
|
|
315
|
+
|
|
316
|
+
{"description": "dd end-tag followed by dd start-tag",
|
|
317
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "dd"], ["StartTag", "http://www.w3.org/1999/xhtml", "dd", {}]],
|
|
318
|
+
"expected": ["<dd>"]
|
|
319
|
+
},
|
|
320
|
+
|
|
321
|
+
{"description": "dd end-tag followed by dt start-tag",
|
|
322
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "dd"], ["StartTag", "http://www.w3.org/1999/xhtml", "dt", {}]],
|
|
323
|
+
"expected": ["<dt>"]
|
|
324
|
+
},
|
|
325
|
+
|
|
326
|
+
{"description": "dd end-tag followed by end-tag",
|
|
327
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "dd"], ["EndTag", "http://www.w3.org/1999/xhtml", "foo"]],
|
|
328
|
+
"expected": ["</foo>"]
|
|
329
|
+
},
|
|
330
|
+
|
|
331
|
+
{"description": "dd end-tag at EOF",
|
|
332
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "dd"]],
|
|
333
|
+
"expected": [""]
|
|
334
|
+
},
|
|
335
|
+
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
{"description": "p end-tag followed by comment",
|
|
340
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "p"], ["Comment", "foo"]],
|
|
341
|
+
"expected": ["</p><!--foo-->"]
|
|
342
|
+
},
|
|
343
|
+
|
|
344
|
+
{"description": "p end-tag followed by space character",
|
|
345
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "p"], ["Characters", " foo"]],
|
|
346
|
+
"expected": ["</p> foo"]
|
|
347
|
+
},
|
|
348
|
+
|
|
349
|
+
{"description": "p end-tag followed by text",
|
|
350
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "p"], ["Characters", "foo"]],
|
|
351
|
+
"expected": ["</p>foo"]
|
|
352
|
+
},
|
|
353
|
+
|
|
354
|
+
{"description": "p end-tag followed by start-tag",
|
|
355
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "p"], ["StartTag", "http://www.w3.org/1999/xhtml", "foo", {}]],
|
|
356
|
+
"expected": ["</p><foo>"]
|
|
357
|
+
},
|
|
358
|
+
|
|
359
|
+
{"description": "p end-tag followed by address start-tag",
|
|
360
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "p"], ["StartTag", "http://www.w3.org/1999/xhtml", "address", {}]],
|
|
361
|
+
"expected": ["<address>"]
|
|
362
|
+
},
|
|
363
|
+
|
|
364
|
+
{"description": "p end-tag followed by article start-tag",
|
|
365
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "p"], ["StartTag", "http://www.w3.org/1999/xhtml", "article", {}]],
|
|
366
|
+
"expected": ["<article>"]
|
|
367
|
+
},
|
|
368
|
+
|
|
369
|
+
{"description": "p end-tag followed by aside start-tag",
|
|
370
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "p"], ["StartTag", "http://www.w3.org/1999/xhtml", "aside", {}]],
|
|
371
|
+
"expected": ["<aside>"]
|
|
372
|
+
},
|
|
373
|
+
|
|
374
|
+
{"description": "p end-tag followed by blockquote start-tag",
|
|
375
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "p"], ["StartTag", "http://www.w3.org/1999/xhtml", "blockquote", {}]],
|
|
376
|
+
"expected": ["<blockquote>"]
|
|
377
|
+
},
|
|
378
|
+
|
|
379
|
+
{"description": "p end-tag followed by datagrid start-tag",
|
|
380
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "p"], ["StartTag", "http://www.w3.org/1999/xhtml", "datagrid", {}]],
|
|
381
|
+
"expected": ["<datagrid>"]
|
|
382
|
+
},
|
|
383
|
+
|
|
384
|
+
{"description": "p end-tag followed by dialog start-tag",
|
|
385
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "p"], ["StartTag", "http://www.w3.org/1999/xhtml", "dialog", {}]],
|
|
386
|
+
"expected": ["<dialog>"]
|
|
387
|
+
},
|
|
388
|
+
|
|
389
|
+
{"description": "p end-tag followed by dir start-tag",
|
|
390
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "p"], ["StartTag", "http://www.w3.org/1999/xhtml", "dir", {}]],
|
|
391
|
+
"expected": ["<dir>"]
|
|
392
|
+
},
|
|
393
|
+
|
|
394
|
+
{"description": "p end-tag followed by div start-tag",
|
|
395
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "p"], ["StartTag", "http://www.w3.org/1999/xhtml", "div", {}]],
|
|
396
|
+
"expected": ["<div>"]
|
|
397
|
+
},
|
|
398
|
+
|
|
399
|
+
{"description": "p end-tag followed by dl start-tag",
|
|
400
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "p"], ["StartTag", "http://www.w3.org/1999/xhtml", "dl", {}]],
|
|
401
|
+
"expected": ["<dl>"]
|
|
402
|
+
},
|
|
403
|
+
|
|
404
|
+
{"description": "p end-tag followed by fieldset start-tag",
|
|
405
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "p"], ["StartTag", "http://www.w3.org/1999/xhtml", "fieldset", {}]],
|
|
406
|
+
"expected": ["<fieldset>"]
|
|
407
|
+
},
|
|
408
|
+
|
|
409
|
+
{"description": "p end-tag followed by footer start-tag",
|
|
410
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "p"], ["StartTag", "http://www.w3.org/1999/xhtml", "footer", {}]],
|
|
411
|
+
"expected": ["<footer>"]
|
|
412
|
+
},
|
|
413
|
+
|
|
414
|
+
{"description": "p end-tag followed by form start-tag",
|
|
415
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "p"], ["StartTag", "http://www.w3.org/1999/xhtml", "form", {}]],
|
|
416
|
+
"expected": ["<form>"]
|
|
417
|
+
},
|
|
418
|
+
|
|
419
|
+
{"description": "p end-tag followed by h1 start-tag",
|
|
420
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "p"], ["StartTag", "http://www.w3.org/1999/xhtml", "h1", {}]],
|
|
421
|
+
"expected": ["<h1>"]
|
|
422
|
+
},
|
|
423
|
+
|
|
424
|
+
{"description": "p end-tag followed by h2 start-tag",
|
|
425
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "p"], ["StartTag", "http://www.w3.org/1999/xhtml", "h2", {}]],
|
|
426
|
+
"expected": ["<h2>"]
|
|
427
|
+
},
|
|
428
|
+
|
|
429
|
+
{"description": "p end-tag followed by h3 start-tag",
|
|
430
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "p"], ["StartTag", "http://www.w3.org/1999/xhtml", "h3", {}]],
|
|
431
|
+
"expected": ["<h3>"]
|
|
432
|
+
},
|
|
433
|
+
|
|
434
|
+
{"description": "p end-tag followed by h4 start-tag",
|
|
435
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "p"], ["StartTag", "http://www.w3.org/1999/xhtml", "h4", {}]],
|
|
436
|
+
"expected": ["<h4>"]
|
|
437
|
+
},
|
|
438
|
+
|
|
439
|
+
{"description": "p end-tag followed by h5 start-tag",
|
|
440
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "p"], ["StartTag", "http://www.w3.org/1999/xhtml", "h5", {}]],
|
|
441
|
+
"expected": ["<h5>"]
|
|
442
|
+
},
|
|
443
|
+
|
|
444
|
+
{"description": "p end-tag followed by h6 start-tag",
|
|
445
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "p"], ["StartTag", "http://www.w3.org/1999/xhtml", "h6", {}]],
|
|
446
|
+
"expected": ["<h6>"]
|
|
447
|
+
},
|
|
448
|
+
|
|
449
|
+
{"description": "p end-tag followed by header start-tag",
|
|
450
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "p"], ["StartTag", "http://www.w3.org/1999/xhtml", "header", {}]],
|
|
451
|
+
"expected": ["<header>"]
|
|
452
|
+
},
|
|
453
|
+
|
|
454
|
+
{"description": "p end-tag followed by hr empty-tag",
|
|
455
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "p"], ["EmptyTag", "hr", {}]],
|
|
456
|
+
"expected": ["<hr>"]
|
|
457
|
+
},
|
|
458
|
+
|
|
459
|
+
{"description": "p end-tag followed by menu start-tag",
|
|
460
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "p"], ["StartTag", "http://www.w3.org/1999/xhtml", "menu", {}]],
|
|
461
|
+
"expected": ["<menu>"]
|
|
462
|
+
},
|
|
463
|
+
|
|
464
|
+
{"description": "p end-tag followed by nav start-tag",
|
|
465
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "p"], ["StartTag", "http://www.w3.org/1999/xhtml", "nav", {}]],
|
|
466
|
+
"expected": ["<nav>"]
|
|
467
|
+
},
|
|
468
|
+
|
|
469
|
+
{"description": "p end-tag followed by ol start-tag",
|
|
470
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "p"], ["StartTag", "http://www.w3.org/1999/xhtml", "ol", {}]],
|
|
471
|
+
"expected": ["<ol>"]
|
|
472
|
+
},
|
|
473
|
+
|
|
474
|
+
{"description": "p end-tag followed by p start-tag",
|
|
475
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "p"], ["StartTag", "http://www.w3.org/1999/xhtml", "p", {}]],
|
|
476
|
+
"expected": ["<p>"]
|
|
477
|
+
},
|
|
478
|
+
|
|
479
|
+
{"description": "p end-tag followed by pre start-tag",
|
|
480
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "p"], ["StartTag", "http://www.w3.org/1999/xhtml", "pre", {}]],
|
|
481
|
+
"expected": ["<pre>"]
|
|
482
|
+
},
|
|
483
|
+
|
|
484
|
+
{"description": "p end-tag followed by section start-tag",
|
|
485
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "p"], ["StartTag", "http://www.w3.org/1999/xhtml", "section", {}]],
|
|
486
|
+
"expected": ["<section>"]
|
|
487
|
+
},
|
|
488
|
+
|
|
489
|
+
{"description": "p end-tag followed by table start-tag",
|
|
490
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "p"], ["StartTag", "http://www.w3.org/1999/xhtml", "table", {}]],
|
|
491
|
+
"expected": ["<table>"]
|
|
492
|
+
},
|
|
493
|
+
|
|
494
|
+
{"description": "p end-tag followed by ul start-tag",
|
|
495
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "p"], ["StartTag", "http://www.w3.org/1999/xhtml", "ul", {}]],
|
|
496
|
+
"expected": ["<ul>"]
|
|
497
|
+
},
|
|
498
|
+
|
|
499
|
+
{"description": "p end-tag followed by end-tag",
|
|
500
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "p"], ["EndTag", "http://www.w3.org/1999/xhtml", "foo"]],
|
|
501
|
+
"expected": ["</foo>"]
|
|
502
|
+
},
|
|
503
|
+
|
|
504
|
+
{"description": "p end-tag at EOF",
|
|
505
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "p"]],
|
|
506
|
+
"expected": [""]
|
|
507
|
+
},
|
|
508
|
+
|
|
509
|
+
|
|
510
|
+
|
|
511
|
+
|
|
512
|
+
{"description": "optgroup end-tag followed by comment",
|
|
513
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "optgroup"], ["Comment", "foo"]],
|
|
514
|
+
"expected": ["</optgroup><!--foo-->"]
|
|
515
|
+
},
|
|
516
|
+
|
|
517
|
+
{"description": "optgroup end-tag followed by space character",
|
|
518
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "optgroup"], ["Characters", " foo"]],
|
|
519
|
+
"expected": ["</optgroup> foo"]
|
|
520
|
+
},
|
|
521
|
+
|
|
522
|
+
{"description": "optgroup end-tag followed by text",
|
|
523
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "optgroup"], ["Characters", "foo"]],
|
|
524
|
+
"expected": ["</optgroup>foo"]
|
|
525
|
+
},
|
|
526
|
+
|
|
527
|
+
{"description": "optgroup end-tag followed by start-tag",
|
|
528
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "optgroup"], ["StartTag", "http://www.w3.org/1999/xhtml", "foo", {}]],
|
|
529
|
+
"expected": ["</optgroup><foo>"]
|
|
530
|
+
},
|
|
531
|
+
|
|
532
|
+
{"description": "optgroup end-tag followed by optgroup start-tag",
|
|
533
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "optgroup"], ["StartTag", "http://www.w3.org/1999/xhtml", "optgroup", {}]],
|
|
534
|
+
"expected": ["<optgroup>"]
|
|
535
|
+
},
|
|
536
|
+
|
|
537
|
+
{"description": "optgroup end-tag followed by end-tag",
|
|
538
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "optgroup"], ["EndTag", "http://www.w3.org/1999/xhtml", "foo"]],
|
|
539
|
+
"expected": ["</foo>"]
|
|
540
|
+
},
|
|
541
|
+
|
|
542
|
+
{"description": "optgroup end-tag at EOF",
|
|
543
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "optgroup"]],
|
|
544
|
+
"expected": [""]
|
|
545
|
+
},
|
|
546
|
+
|
|
547
|
+
|
|
548
|
+
|
|
549
|
+
|
|
550
|
+
{"description": "option end-tag followed by comment",
|
|
551
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "option"], ["Comment", "foo"]],
|
|
552
|
+
"expected": ["</option><!--foo-->"]
|
|
553
|
+
},
|
|
554
|
+
|
|
555
|
+
{"description": "option end-tag followed by space character",
|
|
556
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "option"], ["Characters", " foo"]],
|
|
557
|
+
"expected": ["</option> foo"]
|
|
558
|
+
},
|
|
559
|
+
|
|
560
|
+
{"description": "option end-tag followed by text",
|
|
561
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "option"], ["Characters", "foo"]],
|
|
562
|
+
"expected": ["</option>foo"]
|
|
563
|
+
},
|
|
564
|
+
|
|
565
|
+
{"description": "option end-tag followed by optgroup start-tag",
|
|
566
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "option"], ["StartTag", "http://www.w3.org/1999/xhtml", "optgroup", {}]],
|
|
567
|
+
"expected": ["<optgroup>"]
|
|
568
|
+
},
|
|
569
|
+
|
|
570
|
+
{"description": "option end-tag followed by start-tag",
|
|
571
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "option"], ["StartTag", "http://www.w3.org/1999/xhtml", "foo", {}]],
|
|
572
|
+
"expected": ["</option><foo>"]
|
|
573
|
+
},
|
|
574
|
+
|
|
575
|
+
{"description": "option end-tag followed by option start-tag",
|
|
576
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "option"], ["StartTag", "http://www.w3.org/1999/xhtml", "option", {}]],
|
|
577
|
+
"expected": ["<option>"]
|
|
578
|
+
},
|
|
579
|
+
|
|
580
|
+
{"description": "option end-tag followed by end-tag",
|
|
581
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "option"], ["EndTag", "http://www.w3.org/1999/xhtml", "foo"]],
|
|
582
|
+
"expected": ["</foo>"]
|
|
583
|
+
},
|
|
584
|
+
|
|
585
|
+
{"description": "option end-tag at EOF",
|
|
586
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "option"]],
|
|
587
|
+
"expected": [""]
|
|
588
|
+
},
|
|
589
|
+
|
|
590
|
+
|
|
591
|
+
|
|
592
|
+
|
|
593
|
+
{"description": "colgroup start-tag followed by comment",
|
|
594
|
+
"input": [["StartTag", "http://www.w3.org/1999/xhtml", "colgroup", {}], ["Comment", "foo"]],
|
|
595
|
+
"expected": ["<colgroup><!--foo-->"]
|
|
596
|
+
},
|
|
597
|
+
|
|
598
|
+
{"description": "colgroup start-tag followed by space character",
|
|
599
|
+
"input": [["StartTag", "http://www.w3.org/1999/xhtml", "colgroup", {}], ["Characters", " foo"]],
|
|
600
|
+
"expected": ["<colgroup> foo"]
|
|
601
|
+
},
|
|
602
|
+
|
|
603
|
+
{"description": "colgroup start-tag followed by text",
|
|
604
|
+
"input": [["StartTag", "http://www.w3.org/1999/xhtml", "colgroup", {}], ["Characters", "foo"]],
|
|
605
|
+
"expected": ["<colgroup>foo"]
|
|
606
|
+
},
|
|
607
|
+
|
|
608
|
+
{"description": "colgroup start-tag followed by start-tag",
|
|
609
|
+
"input": [["StartTag", "http://www.w3.org/1999/xhtml", "colgroup", {}], ["StartTag", "http://www.w3.org/1999/xhtml", "foo", {}]],
|
|
610
|
+
"expected": ["<colgroup><foo>"]
|
|
611
|
+
},
|
|
612
|
+
|
|
613
|
+
{"description": "first colgroup in a table with a col child",
|
|
614
|
+
"input": [["StartTag", "http://www.w3.org/1999/xhtml", "table", {}], ["StartTag", "http://www.w3.org/1999/xhtml", "colgroup", {}], ["EmptyTag", "col", {}]],
|
|
615
|
+
"expected": ["<table><col>"]
|
|
616
|
+
},
|
|
617
|
+
|
|
618
|
+
{"description": "colgroup with a col child, following another colgroup",
|
|
619
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "colgroup"], ["StartTag", "http://www.w3.org/1999/xhtml", "colgroup", {}], ["StartTag", "http://www.w3.org/1999/xhtml", "col", {}]],
|
|
620
|
+
"expected": ["</colgroup><col>", "<colgroup><col>"]
|
|
621
|
+
},
|
|
622
|
+
|
|
623
|
+
{"description": "colgroup start-tag followed by end-tag",
|
|
624
|
+
"input": [["StartTag", "http://www.w3.org/1999/xhtml", "colgroup", {}], ["EndTag", "http://www.w3.org/1999/xhtml", "foo"]],
|
|
625
|
+
"expected": ["<colgroup></foo>"]
|
|
626
|
+
},
|
|
627
|
+
|
|
628
|
+
{"description": "colgroup start-tag at EOF",
|
|
629
|
+
"input": [["StartTag", "http://www.w3.org/1999/xhtml", "colgroup", {}]],
|
|
630
|
+
"expected": ["<colgroup>"]
|
|
631
|
+
},
|
|
632
|
+
|
|
633
|
+
|
|
634
|
+
|
|
635
|
+
{"description": "colgroup end-tag followed by comment",
|
|
636
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "colgroup"], ["Comment", "foo"]],
|
|
637
|
+
"expected": ["</colgroup><!--foo-->"]
|
|
638
|
+
},
|
|
639
|
+
|
|
640
|
+
{"description": "colgroup end-tag followed by space character",
|
|
641
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "colgroup"], ["Characters", " foo"]],
|
|
642
|
+
"expected": ["</colgroup> foo"]
|
|
643
|
+
},
|
|
644
|
+
|
|
645
|
+
{"description": "colgroup end-tag followed by text",
|
|
646
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "colgroup"], ["Characters", "foo"]],
|
|
647
|
+
"expected": ["foo"]
|
|
648
|
+
},
|
|
649
|
+
|
|
650
|
+
{"description": "colgroup end-tag followed by start-tag",
|
|
651
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "colgroup"], ["StartTag", "http://www.w3.org/1999/xhtml", "foo", {}]],
|
|
652
|
+
"expected": ["<foo>"]
|
|
653
|
+
},
|
|
654
|
+
|
|
655
|
+
{"description": "colgroup end-tag followed by end-tag",
|
|
656
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "colgroup"], ["EndTag", "http://www.w3.org/1999/xhtml", "foo"]],
|
|
657
|
+
"expected": ["</foo>"]
|
|
658
|
+
},
|
|
659
|
+
|
|
660
|
+
{"description": "colgroup end-tag at EOF",
|
|
661
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "colgroup"]],
|
|
662
|
+
"expected": [""]
|
|
663
|
+
},
|
|
664
|
+
|
|
665
|
+
|
|
666
|
+
|
|
667
|
+
|
|
668
|
+
{"description": "thead end-tag followed by comment",
|
|
669
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "thead"], ["Comment", "foo"]],
|
|
670
|
+
"expected": ["</thead><!--foo-->"]
|
|
671
|
+
},
|
|
672
|
+
|
|
673
|
+
{"description": "thead end-tag followed by space character",
|
|
674
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "thead"], ["Characters", " foo"]],
|
|
675
|
+
"expected": ["</thead> foo"]
|
|
676
|
+
},
|
|
677
|
+
|
|
678
|
+
{"description": "thead end-tag followed by text",
|
|
679
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "thead"], ["Characters", "foo"]],
|
|
680
|
+
"expected": ["</thead>foo"]
|
|
681
|
+
},
|
|
682
|
+
|
|
683
|
+
{"description": "thead end-tag followed by start-tag",
|
|
684
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "thead"], ["StartTag", "http://www.w3.org/1999/xhtml", "foo", {}]],
|
|
685
|
+
"expected": ["</thead><foo>"]
|
|
686
|
+
},
|
|
687
|
+
|
|
688
|
+
{"description": "thead end-tag followed by tbody start-tag",
|
|
689
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "thead"], ["StartTag", "http://www.w3.org/1999/xhtml", "tbody", {}]],
|
|
690
|
+
"expected": ["<tbody>"]
|
|
691
|
+
},
|
|
692
|
+
|
|
693
|
+
{"description": "thead end-tag followed by tfoot start-tag",
|
|
694
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "thead"], ["StartTag", "http://www.w3.org/1999/xhtml", "tfoot", {}]],
|
|
695
|
+
"expected": ["<tfoot>"]
|
|
696
|
+
},
|
|
697
|
+
|
|
698
|
+
{"description": "thead end-tag followed by end-tag",
|
|
699
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "thead"], ["EndTag", "http://www.w3.org/1999/xhtml", "foo"]],
|
|
700
|
+
"expected": ["</thead></foo>"]
|
|
701
|
+
},
|
|
702
|
+
|
|
703
|
+
{"description": "thead end-tag at EOF",
|
|
704
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "thead"]],
|
|
705
|
+
"expected": ["</thead>"]
|
|
706
|
+
},
|
|
707
|
+
|
|
708
|
+
|
|
709
|
+
|
|
710
|
+
|
|
711
|
+
{"description": "tbody start-tag followed by comment",
|
|
712
|
+
"input": [["StartTag", "http://www.w3.org/1999/xhtml", "tbody", {}], ["Comment", "foo"]],
|
|
713
|
+
"expected": ["<tbody><!--foo-->"]
|
|
714
|
+
},
|
|
715
|
+
|
|
716
|
+
{"description": "tbody start-tag followed by space character",
|
|
717
|
+
"input": [["StartTag", "http://www.w3.org/1999/xhtml", "tbody", {}], ["Characters", " foo"]],
|
|
718
|
+
"expected": ["<tbody> foo"]
|
|
719
|
+
},
|
|
720
|
+
|
|
721
|
+
{"description": "tbody start-tag followed by text",
|
|
722
|
+
"input": [["StartTag", "http://www.w3.org/1999/xhtml", "tbody", {}], ["Characters", "foo"]],
|
|
723
|
+
"expected": ["<tbody>foo"]
|
|
724
|
+
},
|
|
725
|
+
|
|
726
|
+
{"description": "tbody start-tag followed by start-tag",
|
|
727
|
+
"input": [["StartTag", "http://www.w3.org/1999/xhtml", "tbody", {}], ["StartTag", "http://www.w3.org/1999/xhtml", "foo", {}]],
|
|
728
|
+
"expected": ["<tbody><foo>"]
|
|
729
|
+
},
|
|
730
|
+
|
|
731
|
+
{"description": "first tbody in a table with a tr child",
|
|
732
|
+
"input": [["StartTag", "http://www.w3.org/1999/xhtml", "table", {}], ["StartTag", "http://www.w3.org/1999/xhtml", "tbody", {}], ["StartTag", "http://www.w3.org/1999/xhtml", "tr", {}]],
|
|
733
|
+
"expected": ["<table><tr>"]
|
|
734
|
+
},
|
|
735
|
+
|
|
736
|
+
{"description": "tbody with a tr child, following another tbody",
|
|
737
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "tbody"], ["StartTag", "http://www.w3.org/1999/xhtml", "tbody", {}], ["StartTag", "http://www.w3.org/1999/xhtml", "tr", {}]],
|
|
738
|
+
"expected": ["<tbody><tr>", "</tbody><tr>"]
|
|
739
|
+
},
|
|
740
|
+
|
|
741
|
+
{"description": "tbody with a tr child, following a thead",
|
|
742
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "thead"], ["StartTag", "http://www.w3.org/1999/xhtml", "tbody", {}], ["StartTag", "http://www.w3.org/1999/xhtml", "tr", {}]],
|
|
743
|
+
"expected": ["<tbody><tr>", "</thead><tr>"]
|
|
744
|
+
},
|
|
745
|
+
|
|
746
|
+
{"description": "tbody with a tr child, following a tfoot",
|
|
747
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "tfoot"], ["StartTag", "http://www.w3.org/1999/xhtml", "tbody", {}], ["StartTag", "http://www.w3.org/1999/xhtml", "tr", {}]],
|
|
748
|
+
"expected": ["<tbody><tr>", "</tfoot><tr>"]
|
|
749
|
+
},
|
|
750
|
+
|
|
751
|
+
{"description": "tbody start-tag followed by end-tag",
|
|
752
|
+
"input": [["StartTag", "http://www.w3.org/1999/xhtml", "tbody", {}], ["EndTag", "http://www.w3.org/1999/xhtml", "foo"]],
|
|
753
|
+
"expected": ["<tbody></foo>"]
|
|
754
|
+
},
|
|
755
|
+
|
|
756
|
+
{"description": "tbody start-tag at EOF",
|
|
757
|
+
"input": [["StartTag", "http://www.w3.org/1999/xhtml", "tbody", {}]],
|
|
758
|
+
"expected": ["<tbody>"]
|
|
759
|
+
},
|
|
760
|
+
|
|
761
|
+
|
|
762
|
+
|
|
763
|
+
{"description": "tbody end-tag followed by comment",
|
|
764
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "tbody"], ["Comment", "foo"]],
|
|
765
|
+
"expected": ["</tbody><!--foo-->"]
|
|
766
|
+
},
|
|
767
|
+
|
|
768
|
+
{"description": "tbody end-tag followed by space character",
|
|
769
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "tbody"], ["Characters", " foo"]],
|
|
770
|
+
"expected": ["</tbody> foo"]
|
|
771
|
+
},
|
|
772
|
+
|
|
773
|
+
{"description": "tbody end-tag followed by text",
|
|
774
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "tbody"], ["Characters", "foo"]],
|
|
775
|
+
"expected": ["</tbody>foo"]
|
|
776
|
+
},
|
|
777
|
+
|
|
778
|
+
{"description": "tbody end-tag followed by start-tag",
|
|
779
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "tbody"], ["StartTag", "http://www.w3.org/1999/xhtml", "foo", {}]],
|
|
780
|
+
"expected": ["</tbody><foo>"]
|
|
781
|
+
},
|
|
782
|
+
|
|
783
|
+
{"description": "tbody end-tag followed by tbody start-tag",
|
|
784
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "tbody"], ["StartTag", "http://www.w3.org/1999/xhtml", "tbody", {}]],
|
|
785
|
+
"expected": ["<tbody>", "</tbody>"]
|
|
786
|
+
},
|
|
787
|
+
|
|
788
|
+
{"description": "tbody end-tag followed by tfoot start-tag",
|
|
789
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "tbody"], ["StartTag", "http://www.w3.org/1999/xhtml", "tfoot", {}]],
|
|
790
|
+
"expected": ["<tfoot>"]
|
|
791
|
+
},
|
|
792
|
+
|
|
793
|
+
{"description": "tbody end-tag followed by end-tag",
|
|
794
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "tbody"], ["EndTag", "http://www.w3.org/1999/xhtml", "foo"]],
|
|
795
|
+
"expected": ["</foo>"]
|
|
796
|
+
},
|
|
797
|
+
|
|
798
|
+
{"description": "tbody end-tag at EOF",
|
|
799
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "tbody"]],
|
|
800
|
+
"expected": [""]
|
|
801
|
+
},
|
|
802
|
+
|
|
803
|
+
|
|
804
|
+
|
|
805
|
+
|
|
806
|
+
{"description": "tfoot end-tag followed by comment",
|
|
807
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "tfoot"], ["Comment", "foo"]],
|
|
808
|
+
"expected": ["</tfoot><!--foo-->"]
|
|
809
|
+
},
|
|
810
|
+
|
|
811
|
+
{"description": "tfoot end-tag followed by space character",
|
|
812
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "tfoot"], ["Characters", " foo"]],
|
|
813
|
+
"expected": ["</tfoot> foo"]
|
|
814
|
+
},
|
|
815
|
+
|
|
816
|
+
{"description": "tfoot end-tag followed by text",
|
|
817
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "tfoot"], ["Characters", "foo"]],
|
|
818
|
+
"expected": ["</tfoot>foo"]
|
|
819
|
+
},
|
|
820
|
+
|
|
821
|
+
{"description": "tfoot end-tag followed by start-tag",
|
|
822
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "tfoot"], ["StartTag", "http://www.w3.org/1999/xhtml", "foo", {}]],
|
|
823
|
+
"expected": ["</tfoot><foo>"]
|
|
824
|
+
},
|
|
825
|
+
|
|
826
|
+
{"description": "tfoot end-tag followed by tbody start-tag",
|
|
827
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "tfoot"], ["StartTag", "http://www.w3.org/1999/xhtml", "tbody", {}]],
|
|
828
|
+
"expected": ["<tbody>", "</tfoot>"]
|
|
829
|
+
},
|
|
830
|
+
|
|
831
|
+
{"description": "tfoot end-tag followed by end-tag",
|
|
832
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "tfoot"], ["EndTag", "http://www.w3.org/1999/xhtml", "foo"]],
|
|
833
|
+
"expected": ["</foo>"]
|
|
834
|
+
},
|
|
835
|
+
|
|
836
|
+
{"description": "tfoot end-tag at EOF",
|
|
837
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "tfoot"]],
|
|
838
|
+
"expected": [""]
|
|
839
|
+
},
|
|
840
|
+
|
|
841
|
+
|
|
842
|
+
|
|
843
|
+
|
|
844
|
+
{"description": "tr end-tag followed by comment",
|
|
845
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "tr"], ["Comment", "foo"]],
|
|
846
|
+
"expected": ["</tr><!--foo-->"]
|
|
847
|
+
},
|
|
848
|
+
|
|
849
|
+
{"description": "tr end-tag followed by space character",
|
|
850
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "tr"], ["Characters", " foo"]],
|
|
851
|
+
"expected": ["</tr> foo"]
|
|
852
|
+
},
|
|
853
|
+
|
|
854
|
+
{"description": "tr end-tag followed by text",
|
|
855
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "tr"], ["Characters", "foo"]],
|
|
856
|
+
"expected": ["</tr>foo"]
|
|
857
|
+
},
|
|
858
|
+
|
|
859
|
+
{"description": "tr end-tag followed by start-tag",
|
|
860
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "tr"], ["StartTag", "http://www.w3.org/1999/xhtml", "foo", {}]],
|
|
861
|
+
"expected": ["</tr><foo>"]
|
|
862
|
+
},
|
|
863
|
+
|
|
864
|
+
{"description": "tr end-tag followed by tr start-tag",
|
|
865
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "tr"], ["StartTag", "http://www.w3.org/1999/xhtml", "tr", {}]],
|
|
866
|
+
"expected": ["<tr>", "</tr>"]
|
|
867
|
+
},
|
|
868
|
+
|
|
869
|
+
{"description": "tr end-tag followed by end-tag",
|
|
870
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "tr"], ["EndTag", "http://www.w3.org/1999/xhtml", "foo"]],
|
|
871
|
+
"expected": ["</foo>"]
|
|
872
|
+
},
|
|
873
|
+
|
|
874
|
+
{"description": "tr end-tag at EOF",
|
|
875
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "tr"]],
|
|
876
|
+
"expected": [""]
|
|
877
|
+
},
|
|
878
|
+
|
|
879
|
+
|
|
880
|
+
|
|
881
|
+
|
|
882
|
+
{"description": "td end-tag followed by comment",
|
|
883
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "td"], ["Comment", "foo"]],
|
|
884
|
+
"expected": ["</td><!--foo-->"]
|
|
885
|
+
},
|
|
886
|
+
|
|
887
|
+
{"description": "td end-tag followed by space character",
|
|
888
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "td"], ["Characters", " foo"]],
|
|
889
|
+
"expected": ["</td> foo"]
|
|
890
|
+
},
|
|
891
|
+
|
|
892
|
+
{"description": "td end-tag followed by text",
|
|
893
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "td"], ["Characters", "foo"]],
|
|
894
|
+
"expected": ["</td>foo"]
|
|
895
|
+
},
|
|
896
|
+
|
|
897
|
+
{"description": "td end-tag followed by start-tag",
|
|
898
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "td"], ["StartTag", "http://www.w3.org/1999/xhtml", "foo", {}]],
|
|
899
|
+
"expected": ["</td><foo>"]
|
|
900
|
+
},
|
|
901
|
+
|
|
902
|
+
{"description": "td end-tag followed by td start-tag",
|
|
903
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "td"], ["StartTag", "http://www.w3.org/1999/xhtml", "td", {}]],
|
|
904
|
+
"expected": ["<td>", "</td>"]
|
|
905
|
+
},
|
|
906
|
+
|
|
907
|
+
{"description": "td end-tag followed by th start-tag",
|
|
908
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "td"], ["StartTag", "http://www.w3.org/1999/xhtml", "th", {}]],
|
|
909
|
+
"expected": ["<th>", "</td>"]
|
|
910
|
+
},
|
|
911
|
+
|
|
912
|
+
{"description": "td end-tag followed by end-tag",
|
|
913
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "td"], ["EndTag", "http://www.w3.org/1999/xhtml", "foo"]],
|
|
914
|
+
"expected": ["</foo>"]
|
|
915
|
+
},
|
|
916
|
+
|
|
917
|
+
{"description": "td end-tag at EOF",
|
|
918
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "td"]],
|
|
919
|
+
"expected": [""]
|
|
920
|
+
},
|
|
921
|
+
|
|
922
|
+
|
|
923
|
+
|
|
924
|
+
|
|
925
|
+
{"description": "th end-tag followed by comment",
|
|
926
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "th"], ["Comment", "foo"]],
|
|
927
|
+
"expected": ["</th><!--foo-->"]
|
|
928
|
+
},
|
|
929
|
+
|
|
930
|
+
{"description": "th end-tag followed by space character",
|
|
931
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "th"], ["Characters", " foo"]],
|
|
932
|
+
"expected": ["</th> foo"]
|
|
933
|
+
},
|
|
934
|
+
|
|
935
|
+
{"description": "th end-tag followed by text",
|
|
936
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "th"], ["Characters", "foo"]],
|
|
937
|
+
"expected": ["</th>foo"]
|
|
938
|
+
},
|
|
939
|
+
|
|
940
|
+
{"description": "th end-tag followed by start-tag",
|
|
941
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "th"], ["StartTag", "http://www.w3.org/1999/xhtml", "foo", {}]],
|
|
942
|
+
"expected": ["</th><foo>"]
|
|
943
|
+
},
|
|
944
|
+
|
|
945
|
+
{"description": "th end-tag followed by th start-tag",
|
|
946
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "th"], ["StartTag", "http://www.w3.org/1999/xhtml", "th", {}]],
|
|
947
|
+
"expected": ["<th>", "</th>"]
|
|
948
|
+
},
|
|
949
|
+
|
|
950
|
+
{"description": "th end-tag followed by td start-tag",
|
|
951
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "th"], ["StartTag", "http://www.w3.org/1999/xhtml", "td", {}]],
|
|
952
|
+
"expected": ["<td>", "</th>"]
|
|
953
|
+
},
|
|
954
|
+
|
|
955
|
+
{"description": "th end-tag followed by end-tag",
|
|
956
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml", "th"], ["EndTag", "http://www.w3.org/1999/xhtml", "foo"]],
|
|
957
|
+
"expected": ["</foo>"]
|
|
958
|
+
},
|
|
959
|
+
|
|
960
|
+
{"description": "th end-tag at EOF",
|
|
961
|
+
"input": [["EndTag", "http://www.w3.org/1999/xhtml" , "th"]],
|
|
962
|
+
"expected": [""]
|
|
963
|
+
}
|
|
964
|
+
|
|
965
|
+
]}
|