parse5 0.6.1 → 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 (80) hide show
  1. package/.npmignore +3 -1
  2. package/LICENSE +1 -1
  3. package/README.md +166 -77
  4. package/index.js +7 -0
  5. package/lib/{html.js → const/html.js} +0 -0
  6. package/lib/{unicode.js → const/unicode.js} +0 -0
  7. package/lib/{named_entity_trie.js → tokenization_stage/named_entity_trie.js} +1 -1
  8. package/lib/tokenization_stage/parser_simulator.js +2 -0
  9. package/lib/{preprocessor.js → tokenization_stage/preprocessor.js} +5 -5
  10. package/lib/{tokenizer.js → tokenization_stage/tokenizer.js} +37 -37
  11. package/lib/{default_tree_adapter.js → tree_adapters/default.js} +47 -0
  12. package/lib/tree_adapters/htmlparser2.js +267 -0
  13. package/lib/{formatting_element_list.js → tree_construction_stage/formatting_element_list.js} +1 -1
  14. package/lib/{open_element_stack.js → tree_construction_stage/open_element_stack.js} +2 -2
  15. package/lib/{parser.js → tree_construction_stage/parser.js} +8 -8
  16. package/lib/tree_construction_stage/tree_serializer.js +165 -0
  17. package/package.json +33 -26
  18. package/test/data/tokenizer/contentModelFlags.test +0 -75
  19. package/test/data/tokenizer/domjs.test +0 -90
  20. package/test/data/tokenizer/entities.test +0 -283
  21. package/test/data/tokenizer/escapeFlag.test +0 -33
  22. package/test/data/tokenizer/namedEntities.test +0 -44189
  23. package/test/data/tokenizer/numericEntities.test +0 -1313
  24. package/test/data/tokenizer/pendingSpecChanges.test +0 -7
  25. package/test/data/tokenizer/test1.test +0 -196
  26. package/test/data/tokenizer/test2.test +0 -179
  27. package/test/data/tokenizer/test3.test +0 -6047
  28. package/test/data/tokenizer/test4.test +0 -344
  29. package/test/data/tokenizer/unicodeChars.test +0 -1295
  30. package/test/data/tokenizer/unicodeCharsProblematic.test +0 -27
  31. package/test/data/tree-construction/adoption01.dat +0 -275
  32. package/test/data/tree-construction/adoption02.dat +0 -31
  33. package/test/data/tree-construction/comments01.dat +0 -146
  34. package/test/data/tree-construction/doctype01.dat +0 -370
  35. package/test/data/tree-construction/domjs-unsafe.dat +0 -0
  36. package/test/data/tree-construction/entities01.dat +0 -603
  37. package/test/data/tree-construction/entities02.dat +0 -249
  38. package/test/data/tree-construction/html5test-com.dat +0 -246
  39. package/test/data/tree-construction/inbody01.dat +0 -43
  40. package/test/data/tree-construction/isindex.dat +0 -40
  41. package/test/data/tree-construction/main-element.dat +0 -29
  42. package/test/data/tree-construction/pending-spec-changes-plain-text-unsafe.dat +0 -0
  43. package/test/data/tree-construction/pending-spec-changes.dat +0 -52
  44. package/test/data/tree-construction/plain-text-unsafe.dat +0 -0
  45. package/test/data/tree-construction/scriptdata01.dat +0 -308
  46. package/test/data/tree-construction/tables01.dat +0 -212
  47. package/test/data/tree-construction/tests1.dat +0 -1952
  48. package/test/data/tree-construction/tests10.dat +0 -799
  49. package/test/data/tree-construction/tests11.dat +0 -482
  50. package/test/data/tree-construction/tests12.dat +0 -62
  51. package/test/data/tree-construction/tests14.dat +0 -74
  52. package/test/data/tree-construction/tests15.dat +0 -208
  53. package/test/data/tree-construction/tests16.dat +0 -2299
  54. package/test/data/tree-construction/tests17.dat +0 -153
  55. package/test/data/tree-construction/tests18.dat +0 -269
  56. package/test/data/tree-construction/tests19.dat +0 -1249
  57. package/test/data/tree-construction/tests2.dat +0 -763
  58. package/test/data/tree-construction/tests20.dat +0 -455
  59. package/test/data/tree-construction/tests21.dat +0 -257
  60. package/test/data/tree-construction/tests22.dat +0 -157
  61. package/test/data/tree-construction/tests23.dat +0 -155
  62. package/test/data/tree-construction/tests24.dat +0 -79
  63. package/test/data/tree-construction/tests25.dat +0 -219
  64. package/test/data/tree-construction/tests26.dat +0 -313
  65. package/test/data/tree-construction/tests3.dat +0 -305
  66. package/test/data/tree-construction/tests4.dat +0 -59
  67. package/test/data/tree-construction/tests5.dat +0 -191
  68. package/test/data/tree-construction/tests6.dat +0 -663
  69. package/test/data/tree-construction/tests7.dat +0 -390
  70. package/test/data/tree-construction/tests8.dat +0 -148
  71. package/test/data/tree-construction/tests9.dat +0 -457
  72. package/test/data/tree-construction/tests_innerHTML_1.dat +0 -741
  73. package/test/data/tree-construction/tricky01.dat +0 -261
  74. package/test/data/tree-construction/webkit01.dat +0 -594
  75. package/test/data/tree-construction/webkit02.dat +0 -94
  76. package/test/fixtures/formatting_element_list_test.js +0 -267
  77. package/test/fixtures/open_element_stack_test.js +0 -495
  78. package/test/fixtures/parser_test.js +0 -160
  79. package/test/fixtures/tokenizer_test.js +0 -178
  80. package/test/run_tests.js +0 -10
@@ -1,75 +0,0 @@
1
- {"tests": [
2
-
3
- {"description":"PLAINTEXT content model flag",
4
- "initialStates":["PLAINTEXT state"],
5
- "lastStartTag":"plaintext",
6
- "input":"<head>&body;",
7
- "output":[["Character", "<head>&body;"]]},
8
-
9
- {"description":"End tag closing RCDATA or RAWTEXT",
10
- "initialStates":["RCDATA state", "RAWTEXT state"],
11
- "lastStartTag":"xmp",
12
- "input":"foo</xmp>",
13
- "output":[["Character", "foo"], ["EndTag", "xmp"]]},
14
-
15
- {"description":"End tag closing RCDATA or RAWTEXT (case-insensitivity)",
16
- "initialStates":["RCDATA state", "RAWTEXT state"],
17
- "lastStartTag":"xmp",
18
- "input":"foo</xMp>",
19
- "output":[["Character", "foo"], ["EndTag", "xmp"]]},
20
-
21
- {"description":"End tag closing RCDATA or RAWTEXT (ending with space)",
22
- "initialStates":["RCDATA state", "RAWTEXT state"],
23
- "lastStartTag":"xmp",
24
- "input":"foo</xmp ",
25
- "output":[["Character", "foo"], "ParseError"]},
26
-
27
- {"description":"End tag closing RCDATA or RAWTEXT (ending with EOF)",
28
- "initialStates":["RCDATA state", "RAWTEXT state"],
29
- "lastStartTag":"xmp",
30
- "input":"foo</xmp",
31
- "output":[["Character", "foo</xmp"]]},
32
-
33
- {"description":"End tag closing RCDATA or RAWTEXT (ending with slash)",
34
- "initialStates":["RCDATA state", "RAWTEXT state"],
35
- "lastStartTag":"xmp",
36
- "input":"foo</xmp/",
37
- "output":[["Character", "foo"], "ParseError"]},
38
-
39
- {"description":"End tag not closing RCDATA or RAWTEXT (ending with left-angle-bracket)",
40
- "initialStates":["RCDATA state", "RAWTEXT state"],
41
- "lastStartTag":"xmp",
42
- "input":"foo</xmp<",
43
- "output":[["Character", "foo</xmp<"]]},
44
-
45
- {"description":"End tag with incorrect name in RCDATA or RAWTEXT",
46
- "initialStates":["RCDATA state", "RAWTEXT state"],
47
- "lastStartTag":"xmp",
48
- "input":"</foo>bar</xmp>",
49
- "output":[["Character", "</foo>bar"], ["EndTag", "xmp"]]},
50
-
51
- {"description":"End tag with incorrect name in RCDATA or RAWTEXT (starting like correct name)",
52
- "initialStates":["RCDATA state", "RAWTEXT state"],
53
- "lastStartTag":"xmp",
54
- "input":"</foo>bar</xmpaar>",
55
- "output":[["Character", "</foo>bar</xmpaar>"]]},
56
-
57
- {"description":"End tag closing RCDATA or RAWTEXT, switching back to PCDATA",
58
- "initialStates":["RCDATA state", "RAWTEXT state"],
59
- "lastStartTag":"xmp",
60
- "input":"foo</xmp></baz>",
61
- "output":[["Character", "foo"], ["EndTag", "xmp"], ["EndTag", "baz"]]},
62
-
63
- {"description":"RAWTEXT w/ something looking like an entity",
64
- "initialStates":["RAWTEXT state"],
65
- "lastStartTag":"xmp",
66
- "input":"&foo;",
67
- "output":[["Character", "&foo;"]]},
68
-
69
- {"description":"RCDATA w/ an entity",
70
- "initialStates":["RCDATA state"],
71
- "lastStartTag":"textarea",
72
- "input":"&lt;",
73
- "output":[["Character", "<"]]}
74
-
75
- ]}
@@ -1,90 +0,0 @@
1
- {
2
- "tests": [
3
- {
4
- "description":"CR in bogus comment state",
5
- "input":"<?\u000d",
6
- "output":["ParseError", ["Comment", "?\u000a"]]
7
- },
8
- {
9
- "description":"CRLF in bogus comment state",
10
- "input":"<?\u000d\u000a",
11
- "output":["ParseError", ["Comment", "?\u000a"]]
12
- },
13
- {
14
- "description":"NUL in RCDATA and RAWTEXT",
15
- "doubleEscaped":true,
16
- "initialStates":["RCDATA state", "RAWTEXT state"],
17
- "input":"\\u0000",
18
- "output":["ParseError", ["Character", "\\uFFFD"]]
19
- },
20
- {
21
- "description":"skip first BOM but not later ones",
22
- "input":"\uFEFFfoo\uFEFFbar",
23
- "output":[["Character", "foo\uFEFFbar"]]
24
- },
25
- {
26
- "description":"Non BMP-charref in in RCDATA",
27
- "initialStates":["RCDATA state"],
28
- "input":"&NotEqualTilde;",
29
- "output":[["Character", "\u2242\u0338"]]
30
- },
31
- {
32
- "description":"Bad charref in in RCDATA",
33
- "initialStates":["RCDATA state"],
34
- "input":"&NotEqualTild;",
35
- "output":["ParseError", ["Character", "&NotEqualTild;"]]
36
- },
37
- {
38
- "description":"lowercase endtags in RCDATA and RAWTEXT",
39
- "initialStates":["RCDATA state", "RAWTEXT state"],
40
- "lastStartTag":"xmp",
41
- "input":"</XMP>",
42
- "output":[["EndTag","xmp"]]
43
- },
44
- {
45
- "description":"bad endtag in RCDATA and RAWTEXT",
46
- "initialStates":["RCDATA state", "RAWTEXT state"],
47
- "lastStartTag":"xmp",
48
- "input":"</ XMP>",
49
- "output":[["Character","</ XMP>"]]
50
- },
51
- {
52
- "description":"bad endtag in RCDATA and RAWTEXT",
53
- "initialStates":["RCDATA state", "RAWTEXT state"],
54
- "lastStartTag":"xmp",
55
- "input":"</xm>",
56
- "output":[["Character","</xm>"]]
57
- },
58
- {
59
- "description":"bad endtag in RCDATA and RAWTEXT",
60
- "initialStates":["RCDATA state", "RAWTEXT state"],
61
- "lastStartTag":"xmp",
62
- "input":"</xm ",
63
- "output":[["Character","</xm "]]
64
- },
65
- {
66
- "description":"bad endtag in RCDATA and RAWTEXT",
67
- "initialStates":["RCDATA state", "RAWTEXT state"],
68
- "lastStartTag":"xmp",
69
- "input":"</xm/",
70
- "output":[["Character","</xm/"]]
71
- },
72
- {
73
- "description":"Non BMP-charref in attribute",
74
- "input":"<p id=\"&NotEqualTilde;\">",
75
- "output":[["StartTag", "p", {"id":"\u2242\u0338"}]]
76
- },
77
- {
78
- "description":"--!NUL in comment ",
79
- "doubleEscaped":true,
80
- "input":"<!----!\\u0000-->",
81
- "output":["ParseError", "ParseError", ["Comment", "--!\\uFFFD"]]
82
- },
83
- {
84
- "description":"space EOF after doctype ",
85
- "input":"<!DOCTYPE html ",
86
- "output":["ParseError", ["DOCTYPE", "html", null, null , false]]
87
- }
88
-
89
- ]
90
- }
@@ -1,283 +0,0 @@
1
- {"tests": [
2
-
3
- {"description": "Undefined named entity in attribute value ending in semicolon and whose name starts with a known entity name.",
4
- "input":"<h a='&noti;'>",
5
- "output": ["ParseError", ["StartTag", "h", {"a": "&noti;"}]]},
6
-
7
- {"description": "Entity name followed by the equals sign in an attribute value.",
8
- "input":"<h a='&lang='>",
9
- "output": ["ParseError", ["StartTag", "h", {"a": "&lang="}]]},
10
-
11
- {"description": "CR as numeric entity",
12
- "input":"&#013;",
13
- "output": ["ParseError", ["Character", "\r"]]},
14
-
15
- {"description": "CR as hexadecimal numeric entity",
16
- "input":"&#x00D;",
17
- "output": ["ParseError", ["Character", "\r"]]},
18
-
19
- {"description": "Windows-1252 EURO SIGN numeric entity.",
20
- "input":"&#0128;",
21
- "output": ["ParseError", ["Character", "\u20AC"]]},
22
-
23
- {"description": "Windows-1252 REPLACEMENT CHAR numeric entity.",
24
- "input":"&#0129;",
25
- "output": ["ParseError", ["Character", "\u0081"]]},
26
-
27
- {"description": "Windows-1252 SINGLE LOW-9 QUOTATION MARK numeric entity.",
28
- "input":"&#0130;",
29
- "output": ["ParseError", ["Character", "\u201A"]]},
30
-
31
- {"description": "Windows-1252 LATIN SMALL LETTER F WITH HOOK numeric entity.",
32
- "input":"&#0131;",
33
- "output": ["ParseError", ["Character", "\u0192"]]},
34
-
35
- {"description": "Windows-1252 DOUBLE LOW-9 QUOTATION MARK numeric entity.",
36
- "input":"&#0132;",
37
- "output": ["ParseError", ["Character", "\u201E"]]},
38
-
39
- {"description": "Windows-1252 HORIZONTAL ELLIPSIS numeric entity.",
40
- "input":"&#0133;",
41
- "output": ["ParseError", ["Character", "\u2026"]]},
42
-
43
- {"description": "Windows-1252 DAGGER numeric entity.",
44
- "input":"&#0134;",
45
- "output": ["ParseError", ["Character", "\u2020"]]},
46
-
47
- {"description": "Windows-1252 DOUBLE DAGGER numeric entity.",
48
- "input":"&#0135;",
49
- "output": ["ParseError", ["Character", "\u2021"]]},
50
-
51
- {"description": "Windows-1252 MODIFIER LETTER CIRCUMFLEX ACCENT numeric entity.",
52
- "input":"&#0136;",
53
- "output": ["ParseError", ["Character", "\u02C6"]]},
54
-
55
- {"description": "Windows-1252 PER MILLE SIGN numeric entity.",
56
- "input":"&#0137;",
57
- "output": ["ParseError", ["Character", "\u2030"]]},
58
-
59
- {"description": "Windows-1252 LATIN CAPITAL LETTER S WITH CARON numeric entity.",
60
- "input":"&#0138;",
61
- "output": ["ParseError", ["Character", "\u0160"]]},
62
-
63
- {"description": "Windows-1252 SINGLE LEFT-POINTING ANGLE QUOTATION MARK numeric entity.",
64
- "input":"&#0139;",
65
- "output": ["ParseError", ["Character", "\u2039"]]},
66
-
67
- {"description": "Windows-1252 LATIN CAPITAL LIGATURE OE numeric entity.",
68
- "input":"&#0140;",
69
- "output": ["ParseError", ["Character", "\u0152"]]},
70
-
71
- {"description": "Windows-1252 REPLACEMENT CHAR numeric entity.",
72
- "input":"&#0141;",
73
- "output": ["ParseError", ["Character", "\u008D"]]},
74
-
75
- {"description": "Windows-1252 LATIN CAPITAL LETTER Z WITH CARON numeric entity.",
76
- "input":"&#0142;",
77
- "output": ["ParseError", ["Character", "\u017D"]]},
78
-
79
- {"description": "Windows-1252 REPLACEMENT CHAR numeric entity.",
80
- "input":"&#0143;",
81
- "output": ["ParseError", ["Character", "\u008F"]]},
82
-
83
- {"description": "Windows-1252 REPLACEMENT CHAR numeric entity.",
84
- "input":"&#0144;",
85
- "output": ["ParseError", ["Character", "\u0090"]]},
86
-
87
- {"description": "Windows-1252 LEFT SINGLE QUOTATION MARK numeric entity.",
88
- "input":"&#0145;",
89
- "output": ["ParseError", ["Character", "\u2018"]]},
90
-
91
- {"description": "Windows-1252 RIGHT SINGLE QUOTATION MARK numeric entity.",
92
- "input":"&#0146;",
93
- "output": ["ParseError", ["Character", "\u2019"]]},
94
-
95
- {"description": "Windows-1252 LEFT DOUBLE QUOTATION MARK numeric entity.",
96
- "input":"&#0147;",
97
- "output": ["ParseError", ["Character", "\u201C"]]},
98
-
99
- {"description": "Windows-1252 RIGHT DOUBLE QUOTATION MARK numeric entity.",
100
- "input":"&#0148;",
101
- "output": ["ParseError", ["Character", "\u201D"]]},
102
-
103
- {"description": "Windows-1252 BULLET numeric entity.",
104
- "input":"&#0149;",
105
- "output": ["ParseError", ["Character", "\u2022"]]},
106
-
107
- {"description": "Windows-1252 EN DASH numeric entity.",
108
- "input":"&#0150;",
109
- "output": ["ParseError", ["Character", "\u2013"]]},
110
-
111
- {"description": "Windows-1252 EM DASH numeric entity.",
112
- "input":"&#0151;",
113
- "output": ["ParseError", ["Character", "\u2014"]]},
114
-
115
- {"description": "Windows-1252 SMALL TILDE numeric entity.",
116
- "input":"&#0152;",
117
- "output": ["ParseError", ["Character", "\u02DC"]]},
118
-
119
- {"description": "Windows-1252 TRADE MARK SIGN numeric entity.",
120
- "input":"&#0153;",
121
- "output": ["ParseError", ["Character", "\u2122"]]},
122
-
123
- {"description": "Windows-1252 LATIN SMALL LETTER S WITH CARON numeric entity.",
124
- "input":"&#0154;",
125
- "output": ["ParseError", ["Character", "\u0161"]]},
126
-
127
- {"description": "Windows-1252 SINGLE RIGHT-POINTING ANGLE QUOTATION MARK numeric entity.",
128
- "input":"&#0155;",
129
- "output": ["ParseError", ["Character", "\u203A"]]},
130
-
131
- {"description": "Windows-1252 LATIN SMALL LIGATURE OE numeric entity.",
132
- "input":"&#0156;",
133
- "output": ["ParseError", ["Character", "\u0153"]]},
134
-
135
- {"description": "Windows-1252 REPLACEMENT CHAR numeric entity.",
136
- "input":"&#0157;",
137
- "output": ["ParseError", ["Character", "\u009D"]]},
138
-
139
- {"description": "Windows-1252 EURO SIGN hexadecimal numeric entity.",
140
- "input":"&#x080;",
141
- "output": ["ParseError", ["Character", "\u20AC"]]},
142
-
143
- {"description": "Windows-1252 REPLACEMENT CHAR hexadecimal numeric entity.",
144
- "input":"&#x081;",
145
- "output": ["ParseError", ["Character", "\u0081"]]},
146
-
147
- {"description": "Windows-1252 SINGLE LOW-9 QUOTATION MARK hexadecimal numeric entity.",
148
- "input":"&#x082;",
149
- "output": ["ParseError", ["Character", "\u201A"]]},
150
-
151
- {"description": "Windows-1252 LATIN SMALL LETTER F WITH HOOK hexadecimal numeric entity.",
152
- "input":"&#x083;",
153
- "output": ["ParseError", ["Character", "\u0192"]]},
154
-
155
- {"description": "Windows-1252 DOUBLE LOW-9 QUOTATION MARK hexadecimal numeric entity.",
156
- "input":"&#x084;",
157
- "output": ["ParseError", ["Character", "\u201E"]]},
158
-
159
- {"description": "Windows-1252 HORIZONTAL ELLIPSIS hexadecimal numeric entity.",
160
- "input":"&#x085;",
161
- "output": ["ParseError", ["Character", "\u2026"]]},
162
-
163
- {"description": "Windows-1252 DAGGER hexadecimal numeric entity.",
164
- "input":"&#x086;",
165
- "output": ["ParseError", ["Character", "\u2020"]]},
166
-
167
- {"description": "Windows-1252 DOUBLE DAGGER hexadecimal numeric entity.",
168
- "input":"&#x087;",
169
- "output": ["ParseError", ["Character", "\u2021"]]},
170
-
171
- {"description": "Windows-1252 MODIFIER LETTER CIRCUMFLEX ACCENT hexadecimal numeric entity.",
172
- "input":"&#x088;",
173
- "output": ["ParseError", ["Character", "\u02C6"]]},
174
-
175
- {"description": "Windows-1252 PER MILLE SIGN hexadecimal numeric entity.",
176
- "input":"&#x089;",
177
- "output": ["ParseError", ["Character", "\u2030"]]},
178
-
179
- {"description": "Windows-1252 LATIN CAPITAL LETTER S WITH CARON hexadecimal numeric entity.",
180
- "input":"&#x08A;",
181
- "output": ["ParseError", ["Character", "\u0160"]]},
182
-
183
- {"description": "Windows-1252 SINGLE LEFT-POINTING ANGLE QUOTATION MARK hexadecimal numeric entity.",
184
- "input":"&#x08B;",
185
- "output": ["ParseError", ["Character", "\u2039"]]},
186
-
187
- {"description": "Windows-1252 LATIN CAPITAL LIGATURE OE hexadecimal numeric entity.",
188
- "input":"&#x08C;",
189
- "output": ["ParseError", ["Character", "\u0152"]]},
190
-
191
- {"description": "Windows-1252 REPLACEMENT CHAR hexadecimal numeric entity.",
192
- "input":"&#x08D;",
193
- "output": ["ParseError", ["Character", "\u008D"]]},
194
-
195
- {"description": "Windows-1252 LATIN CAPITAL LETTER Z WITH CARON hexadecimal numeric entity.",
196
- "input":"&#x08E;",
197
- "output": ["ParseError", ["Character", "\u017D"]]},
198
-
199
- {"description": "Windows-1252 REPLACEMENT CHAR hexadecimal numeric entity.",
200
- "input":"&#x08F;",
201
- "output": ["ParseError", ["Character", "\u008F"]]},
202
-
203
- {"description": "Windows-1252 REPLACEMENT CHAR hexadecimal numeric entity.",
204
- "input":"&#x090;",
205
- "output": ["ParseError", ["Character", "\u0090"]]},
206
-
207
- {"description": "Windows-1252 LEFT SINGLE QUOTATION MARK hexadecimal numeric entity.",
208
- "input":"&#x091;",
209
- "output": ["ParseError", ["Character", "\u2018"]]},
210
-
211
- {"description": "Windows-1252 RIGHT SINGLE QUOTATION MARK hexadecimal numeric entity.",
212
- "input":"&#x092;",
213
- "output": ["ParseError", ["Character", "\u2019"]]},
214
-
215
- {"description": "Windows-1252 LEFT DOUBLE QUOTATION MARK hexadecimal numeric entity.",
216
- "input":"&#x093;",
217
- "output": ["ParseError", ["Character", "\u201C"]]},
218
-
219
- {"description": "Windows-1252 RIGHT DOUBLE QUOTATION MARK hexadecimal numeric entity.",
220
- "input":"&#x094;",
221
- "output": ["ParseError", ["Character", "\u201D"]]},
222
-
223
- {"description": "Windows-1252 BULLET hexadecimal numeric entity.",
224
- "input":"&#x095;",
225
- "output": ["ParseError", ["Character", "\u2022"]]},
226
-
227
- {"description": "Windows-1252 EN DASH hexadecimal numeric entity.",
228
- "input":"&#x096;",
229
- "output": ["ParseError", ["Character", "\u2013"]]},
230
-
231
- {"description": "Windows-1252 EM DASH hexadecimal numeric entity.",
232
- "input":"&#x097;",
233
- "output": ["ParseError", ["Character", "\u2014"]]},
234
-
235
- {"description": "Windows-1252 SMALL TILDE hexadecimal numeric entity.",
236
- "input":"&#x098;",
237
- "output": ["ParseError", ["Character", "\u02DC"]]},
238
-
239
- {"description": "Windows-1252 TRADE MARK SIGN hexadecimal numeric entity.",
240
- "input":"&#x099;",
241
- "output": ["ParseError", ["Character", "\u2122"]]},
242
-
243
- {"description": "Windows-1252 LATIN SMALL LETTER S WITH CARON hexadecimal numeric entity.",
244
- "input":"&#x09A;",
245
- "output": ["ParseError", ["Character", "\u0161"]]},
246
-
247
- {"description": "Windows-1252 SINGLE RIGHT-POINTING ANGLE QUOTATION MARK hexadecimal numeric entity.",
248
- "input":"&#x09B;",
249
- "output": ["ParseError", ["Character", "\u203A"]]},
250
-
251
- {"description": "Windows-1252 LATIN SMALL LIGATURE OE hexadecimal numeric entity.",
252
- "input":"&#x09C;",
253
- "output": ["ParseError", ["Character", "\u0153"]]},
254
-
255
- {"description": "Windows-1252 REPLACEMENT CHAR hexadecimal numeric entity.",
256
- "input":"&#x09D;",
257
- "output": ["ParseError", ["Character", "\u009D"]]},
258
-
259
- {"description": "Windows-1252 LATIN SMALL LETTER Z WITH CARON hexadecimal numeric entity.",
260
- "input":"&#x09E;",
261
- "output": ["ParseError", ["Character", "\u017E"]]},
262
-
263
- {"description": "Windows-1252 LATIN CAPITAL LETTER Y WITH DIAERESIS hexadecimal numeric entity.",
264
- "input":"&#x09F;",
265
- "output": ["ParseError", ["Character", "\u0178"]]},
266
-
267
- {"description": "Decimal numeric entity followed by hex character a.",
268
- "input":"&#97a",
269
- "output": ["ParseError", ["Character", "aa"]]},
270
-
271
- {"description": "Decimal numeric entity followed by hex character A.",
272
- "input":"&#97A",
273
- "output": ["ParseError", ["Character", "aA"]]},
274
-
275
- {"description": "Decimal numeric entity followed by hex character f.",
276
- "input":"&#97f",
277
- "output": ["ParseError", ["Character", "af"]]},
278
-
279
- {"description": "Decimal numeric entity followed by hex character A.",
280
- "input":"&#97F",
281
- "output": ["ParseError", ["Character", "aF"]]}
282
-
283
- ]}
@@ -1,33 +0,0 @@
1
- {"tests": [
2
-
3
- {"description":"Commented close tag in RCDATA or RAWTEXT",
4
- "initialStates":["RCDATA state", "RAWTEXT state"],
5
- "lastStartTag":"xmp",
6
- "input":"foo<!--</xmp>--></xmp>",
7
- "output":[["Character", "foo<!--"], ["EndTag", "xmp"], ["Character", "-->"], ["EndTag", "xmp"]]},
8
-
9
- {"description":"Bogus comment in RCDATA or RAWTEXT",
10
- "initialStates":["RCDATA state", "RAWTEXT state"],
11
- "lastStartTag":"xmp",
12
- "input":"foo<!-->baz</xmp>",
13
- "output":[["Character", "foo<!-->baz"], ["EndTag", "xmp"]]},
14
-
15
- {"description":"End tag surrounded by bogus comment in RCDATA or RAWTEXT",
16
- "initialStates":["RCDATA state", "RAWTEXT state"],
17
- "lastStartTag":"xmp",
18
- "input":"foo<!--></xmp><!-->baz</xmp>",
19
- "output":[["Character", "foo<!-->"], ["EndTag", "xmp"], "ParseError", ["Comment", ""], ["Character", "baz"], ["EndTag", "xmp"]]},
20
-
21
- {"description":"Commented entities in RCDATA",
22
- "initialStates":["RCDATA state"],
23
- "lastStartTag":"xmp",
24
- "input":" &amp; <!-- &amp; --> &amp; </xmp>",
25
- "output":[["Character", " & <!-- & --> & "], ["EndTag", "xmp"]]},
26
-
27
- {"description":"Incorrect comment ending sequences in RCDATA or RAWTEXT",
28
- "initialStates":["RCDATA state", "RAWTEXT state"],
29
- "lastStartTag":"xmp",
30
- "input":"foo<!-- x --x>x-- >x--!>x--<></xmp>",
31
- "output":[["Character", "foo<!-- x --x>x-- >x--!>x--<>"], ["EndTag", "xmp"]]}
32
-
33
- ]}