1{ 2 "tests": [ 3 { 4 "description": "FOO<!-- BAR -->BAZ", 5 "input": "FOO<!-- BAR -->BAZ", 6 "output": [ 7 [ 8 "Character", 9 "FOO" 10 ], 11 [ 12 "Comment", 13 " BAR " 14 ], 15 [ 16 "Character", 17 "BAZ" 18 ] 19 ] 20 }, 21 { 22 "description": "FOO<!-- BAR --!>BAZ", 23 "input": "FOO<!-- BAR --!>BAZ", 24 "output": [ 25 [ 26 "Character", 27 "FOO" 28 ], 29 [ 30 "Comment", 31 " BAR " 32 ], 33 [ 34 "Character", 35 "BAZ" 36 ] 37 ] 38 }, 39 { 40 "description": "FOO<!-- BAR -- >BAZ", 41 "input": "FOO<!-- BAR -- >BAZ", 42 "output": [ 43 [ 44 "Character", 45 "FOO" 46 ], 47 [ 48 "Comment", 49 " BAR -- >BAZ" 50 ] 51 ] 52 }, 53 { 54 "description": "FOO<!-- BAR -- <QUX> -- MUX -->BAZ", 55 "input": "FOO<!-- BAR -- <QUX> -- MUX -->BAZ", 56 "output": [ 57 [ 58 "Character", 59 "FOO" 60 ], 61 [ 62 "Comment", 63 " BAR -- <QUX> -- MUX " 64 ], 65 [ 66 "Character", 67 "BAZ" 68 ] 69 ] 70 }, 71 { 72 "description": "FOO<!-- BAR -- <QUX> -- MUX --!>BAZ", 73 "input": "FOO<!-- BAR -- <QUX> -- MUX --!>BAZ", 74 "output": [ 75 [ 76 "Character", 77 "FOO" 78 ], 79 [ 80 "Comment", 81 " BAR -- <QUX> -- MUX " 82 ], 83 [ 84 "Character", 85 "BAZ" 86 ] 87 ] 88 }, 89 { 90 "description": "FOO<!-- BAR -- <QUX> -- MUX -- >BAZ", 91 "input": "FOO<!-- BAR -- <QUX> -- MUX -- >BAZ", 92 "output": [ 93 [ 94 "Character", 95 "FOO" 96 ], 97 [ 98 "Comment", 99 " BAR -- <QUX> -- MUX -- >BAZ" 100 ] 101 ] 102 }, 103 { 104 "description": "FOO<!---->BAZ", 105 "input": "FOO<!---->BAZ", 106 "output": [ 107 [ 108 "Character", 109 "FOO" 110 ], 111 [ 112 "Comment", 113 "" 114 ], 115 [ 116 "Character", 117 "BAZ" 118 ] 119 ] 120 }, 121 { 122 "description": "FOO<!--->BAZ", 123 "input": "FOO<!--->BAZ", 124 "output": [ 125 [ 126 "Character", 127 "FOO" 128 ], 129 [ 130 "Comment", 131 "" 132 ], 133 [ 134 "Character", 135 "BAZ" 136 ] 137 ] 138 }, 139 { 140 "description": "FOO<!-->BAZ", 141 "input": "FOO<!-->BAZ", 142 "output": [ 143 [ 144 "Character", 145 "FOO" 146 ], 147 [ 148 "Comment", 149 "" 150 ], 151 [ 152 "Character", 153 "BAZ" 154 ] 155 ] 156 }, 157 { 158 "description": "<?xml version=\"1.0\">Hi", 159 "input": "<?xml version=\"1.0\">Hi", 160 "output": [ 161 [ 162 "Comment", 163 "?xml version=\"1.0\"" 164 ], 165 [ 166 "Character", 167 "Hi" 168 ] 169 ] 170 }, 171 { 172 "description": "<?xml version=\"1.0\">", 173 "input": "<?xml version=\"1.0\">", 174 "output": [ 175 [ 176 "Comment", 177 "?xml version=\"1.0\"" 178 ] 179 ] 180 }, 181 { 182 "description": "<?xml version", 183 "input": "<?xml version", 184 "output": [ 185 [ 186 "Comment", 187 "?xml version" 188 ] 189 ] 190 }, 191 { 192 "description": "FOO<!----->BAZ", 193 "input": "FOO<!----->BAZ", 194 "output": [ 195 [ 196 "Character", 197 "FOO" 198 ], 199 [ 200 "Comment", 201 "-" 202 ], 203 [ 204 "Character", 205 "BAZ" 206 ] 207 ] 208 }, 209 { 210 "description": "<html><!-- comment --><title>Comment before head</title>", 211 "input": "<html><!-- comment --><title>Comment before head</title>", 212 "output": [ 213 [ 214 "StartTag", 215 "html", 216 {} 217 ], 218 [ 219 "Comment", 220 " comment " 221 ], 222 [ 223 "StartTag", 224 "title", 225 {} 226 ], 227 [ 228 "Character", 229 "Comment before head" 230 ], 231 [ 232 "EndTag", 233 "title" 234 ] 235 ] 236 } 237 ] 238}