strikethrough.js (46223B)
1 // For documentation of the format, see README in this directory. 2 var browserTests = [ 3 ["foo[]bar", 4 [["strikethrough",""]], 5 "foo[]bar", 6 [true], 7 {"strikethrough":[false,false,"",false,true,""]}], 8 ["<p>[foo</p> <p>bar]</p>", 9 [["stylewithcss","true"],["strikethrough",""]], 10 "<p><span style=\"text-decoration:line-through\">[foo</span></p> <p><span style=\"text-decoration:line-through\">bar]</span></p>", 11 [true,true], 12 {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], 13 ["<p>[foo</p> <p>bar]</p>", 14 [["stylewithcss","false"],["strikethrough",""]], 15 "<p><strike>[foo</strike></p> <p><strike>bar]</strike></p>", 16 [true,true], 17 {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], 18 // The first <span> should be styled with text-decoration, then, it becomes a 19 // good container for the following text node and the other <span>. 20 ["<span>[foo</span> <span>bar]</span>", 21 [["stylewithcss","true"],["strikethrough",""]], 22 "<span style=\"text-decoration:line-through\"><span>foo</span> <span>bar</span></span>", 23 [true,true], 24 {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], 25 ["<span>[foo</span> <span>bar]</span>", 26 [["stylewithcss","false"],["strikethrough",""]], 27 "<strike><span>[foo</span> <span>bar]</span></strike>", 28 [true,true], 29 {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], 30 // Entire the content of the first <p> and the last <p> should be wrapped in 31 // new <span> elements, and in the middle <p>, the <span> element should be 32 // styled but the invisible text nodes should be ignored. 33 ["<p>[foo</p><p> <span>bar</span> </p><p>baz]</p>", 34 [["stylewithcss","true"],["strikethrough",""]], 35 "<p><span style=\"text-decoration:line-through\">[foo</span></p><p> <span style=\"text-decoration:line-through\">bar</span> </p><p><span style=\"text-decoration:line-through\">baz</span></p>", 36 [true,true], 37 {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], 38 ["<p>[foo</p><p> <span>bar</span> </p><p>baz]</p>", 39 [["stylewithcss","false"],["strikethrough",""]], 40 "<p><strike>[foo</strike></p><p> <strike><span>bar</span></strike> </p><p><strike>baz]</strike></p>", 41 [true,true], 42 {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], 43 ["<p>[foo<p><br><p>bar]", 44 [["stylewithcss","true"],["strikethrough",""]], 45 "<p><span style=\"text-decoration:line-through\">[foo</span></p><p><span style=\"text-decoration:line-through\"><br></span></p><p><span style=\"text-decoration:line-through\">bar]</span></p>", 46 [true,true], 47 {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], 48 ["<p>[foo<p><br><p>bar]", 49 [["stylewithcss","false"],["strikethrough",""]], 50 "<p><strike>[foo</strike></p><p><strike><br></strike></p><p><strike>bar]</strike></p>", 51 [true,true], 52 {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], 53 ["<b>foo[]bar</b>", 54 [["strikethrough",""]], 55 "<b>foo[]bar</b>", 56 [true], 57 {"strikethrough":[false,false,"",false,true,""]}], 58 ["<i>foo[]bar</i>", 59 [["strikethrough",""]], 60 "<i>foo[]bar</i>", 61 [true], 62 {"strikethrough":[false,false,"",false,true,""]}], 63 ["<span>foo</span>{}<span>bar</span>", 64 [["strikethrough",""]], 65 "<span>foo</span>{}<span>bar</span>", 66 [true], 67 {"strikethrough":[false,false,"",false,true,""]}], 68 ["<span>foo[</span><span>]bar</span>", 69 [["strikethrough",""]], 70 "<span>foo[</span><span>]bar</span>", 71 [true], 72 {"strikethrough":[false,false,"",false,true,""]}], 73 ["foo[bar]baz", 74 [["stylewithcss","true"],["strikethrough",""]], 75 "foo<span style=\"text-decoration:line-through\">[bar]</span>baz", 76 [true,true], 77 {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], 78 ["foo[bar]baz", 79 [["stylewithcss","false"],["strikethrough",""]], 80 "foo<strike>[bar]</strike>baz", 81 [true,true], 82 {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], 83 ["foo[bar<b>baz]qoz</b>quz", 84 [["stylewithcss","true"],["strikethrough",""]], 85 "foo<span style=\"text-decoration:line-through\">[bar</span><b><span style=\"text-decoration:line-through\">baz]</span>qoz</b>quz", 86 [true,true], 87 {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], 88 ["foo[bar<b>baz]qoz</b>quz", 89 [["stylewithcss","false"],["strikethrough",""]], 90 "foo<strike>[bar</strike><b><strike>baz]</strike>qoz</b>quz", 91 [true,true], 92 {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], 93 ["foo[bar<i>baz]qoz</i>quz", 94 [["stylewithcss","true"],["strikethrough",""]], 95 "foo<span style=\"text-decoration:line-through\">[bar</span><i><span style=\"text-decoration:line-through\">baz]</span>qoz</i>quz", 96 [true,true], 97 {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], 98 ["foo[bar<i>baz]qoz</i>quz", 99 [["stylewithcss","false"],["strikethrough",""]], 100 "foo<strike>[bar</strike><i><strike>baz]</strike>qoz</i>quz", 101 [true,true], 102 {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], 103 ["{<p><p> <p>foo</p>}", 104 [["stylewithcss","true"],["strikethrough",""]], 105 "{<p></p><p> </p><p><span style=\"text-decoration:line-through\">foo</span></p>}", 106 [true,true], 107 {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], 108 ["{<p><p> <p>foo</p>}", 109 [["stylewithcss","false"],["strikethrough",""]], 110 "{<p></p><p> </p><p><strike>foo</strike></p>}", 111 [true,true], 112 {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], 113 ["<table><tbody><tr><td>foo<td>b[a]r<td>baz</table>", 114 [["stylewithcss","true"],["strikethrough",""]], 115 "<table><tbody><tr><td>foo</td><td>b<span style=\"text-decoration:line-through\">[a]</span>r</td><td>baz</td></tr></tbody></table>", 116 [true,true], 117 {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], 118 ["<table><tbody><tr><td>foo<td>b[a]r<td>baz</table>", 119 [["stylewithcss","false"],["strikethrough",""]], 120 "<table><tbody><tr><td>foo</td><td>b<strike>[a]</strike>r</td><td>baz</td></tr></tbody></table>", 121 [true,true], 122 {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], 123 ["<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table>", 124 [["stylewithcss","true"],["strikethrough",""]], 125 "<table><tbody><tr><td>foo</td>{<td><span style=\"text-decoration:line-through\">bar</span></td>}<td>baz</td></tr></tbody></table>", 126 [true,true], 127 {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], 128 ["<table><tbody><tr data-start=1 data-end=2><td>foo<td>bar<td>baz</table>", 129 [["stylewithcss","false"],["strikethrough",""]], 130 "<table><tbody><tr><td>foo</td>{<td><strike>bar</strike></td>}<td>baz</td></tr></tbody></table>", 131 [true,true], 132 {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], 133 ["<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table>", 134 [["stylewithcss","true"],["strikethrough",""]], 135 "<table><tbody><tr>{<td><span style=\"text-decoration:line-through\">foo</span></td><td><span style=\"text-decoration:line-through\">bar</span></td>}<td>baz</td></tr></tbody></table>", 136 [true,true], 137 {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], 138 ["<table><tbody><tr data-start=0 data-end=2><td>foo<td>bar<td>baz</table>", 139 [["stylewithcss","false"],["strikethrough",""]], 140 "<table><tbody><tr>{<td><strike>foo</strike></td><td><strike>bar</strike></td>}<td>baz</td></tr></tbody></table>", 141 [true,true], 142 {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], 143 ["<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table>", 144 [["stylewithcss","true"],["strikethrough",""]], 145 "<table><tbody>{<tr><td><span style=\"text-decoration:line-through\">foo</span></td><td><span style=\"text-decoration:line-through\">bar</span></td><td><span style=\"text-decoration:line-through\">baz</span></td></tr>}</tbody></table>", 146 [true,true], 147 {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], 148 ["<table><tbody data-start=0 data-end=1><tr><td>foo<td>bar<td>baz</table>", 149 [["stylewithcss","false"],["strikethrough",""]], 150 "<table><tbody>{<tr><td><strike>foo</strike></td><td><strike>bar</strike></td><td><strike>baz</strike></td></tr>}</tbody></table>", 151 [true,true], 152 {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], 153 ["<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table>", 154 [["stylewithcss","true"],["strikethrough",""]], 155 "<table>{<tbody><tr><td><span style=\"text-decoration:line-through\">foo</span></td><td><span style=\"text-decoration:line-through\">bar</span></td><td><span style=\"text-decoration:line-through\">baz</span></td></tr></tbody>}</table>", 156 [true,true], 157 {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], 158 ["<table data-start=0 data-end=1><tbody><tr><td>foo<td>bar<td>baz</table>", 159 [["stylewithcss","false"],["strikethrough",""]], 160 "<table>{<tbody><tr><td><strike>foo</strike></td><td><strike>bar</strike></td><td><strike>baz</strike></td></tr></tbody>}</table>", 161 [true,true], 162 {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], 163 ["{<table><tr><td>foo<td>bar<td>baz</table>}", 164 [["stylewithcss","true"],["strikethrough",""]], 165 "{<table><tbody><tr><td><span style=\"text-decoration:line-through\">foo</span></td><td><span style=\"text-decoration:line-through\">bar</span></td><td><span style=\"text-decoration:line-through\">baz</span></td></tr></tbody></table>}", 166 [true,true], 167 {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], 168 ["{<table><tr><td>foo<td>bar<td>baz</table>}", 169 [["stylewithcss","false"],["strikethrough",""]], 170 "{<table><tbody><tr><td><strike>foo</strike></td><td><strike>bar</strike></td><td><strike>baz</strike></td></tr></tbody></table>}", 171 [true,true], 172 {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], 173 // <u> is just representing underline style. Therefore, browsers should not 174 // keep it. Instead, it should be replaced with new <span> and set its 175 // text-decoration to line-through (requested style) and underline (default 176 // style of <u>). 177 ["foo<u>[bar]</u>baz", 178 [["stylewithcss","true"],["strikethrough",""]], 179 "foo<span style=\"text-decoration:underline line-through\">[bar]</span>baz", 180 [true,true], 181 {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], 182 ["foo<u>[bar]</u>baz", 183 [["stylewithcss","false"],["strikethrough",""]], 184 "foo<u><strike>[bar]</strike></u>baz", 185 [true,true], 186 {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], 187 // The <span> which is a container of the range has text-decoration style. 188 // Therefore, it should be updated rather than creating new element. 189 ["foo<span style=\"text-decoration: underline\">[bar]</span>baz", 190 [["stylewithcss","true"],["strikethrough",""]], 191 "foo<span style=\"text-decoration:underline line-through\">[bar]</span>baz", 192 [true,true], 193 {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], 194 ["foo<span style=\"text-decoration: underline\">[bar]</span>baz", 195 [["stylewithcss","false"],["strikethrough",""]], 196 "foo<strike><span style=\"text-decoration:underline\">[bar]</span></strike>baz", 197 [true,true], 198 {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], 199 ["<u>foo[bar]baz</u>", 200 [["stylewithcss","true"],["strikethrough",""]], 201 "<u>foo<span style=\"text-decoration:line-through\">[bar]</span>baz</u>", 202 [true,true], 203 {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], 204 ["<u>foo[bar]baz</u>", 205 [["stylewithcss","false"],["strikethrough",""]], 206 "<u>foo<strike>[bar]</strike>baz</u>", 207 [true,true], 208 {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], 209 ["<u>foo[b<span style=\"color:blue\">ar]ba</span>z</u>", 210 [["stylewithcss","true"],["strikethrough",""]], 211 "<u>foo<span style=\"text-decoration:line-through\">[b</span><span style=\"color:rgb(0, 0, 255)\"><span style=\"text-decoration:line-through\">ar]</span>ba</span>z</u>", 212 [true,true], 213 {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], 214 ["<u>foo[b<span style=\"color:blue\">ar]ba</span>z</u>", 215 [["stylewithcss","false"],["strikethrough",""]], 216 "<u>foo<strike>[b</strike><span style=\"color:rgb(0, 0, 255)\"><strike>ar]</strike>ba</span>z</u>", 217 [true,true], 218 {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], 219 ["<u>foo[b<span style=\"color:blue\" id=foo>ar]ba</span>z</u>", 220 [["stylewithcss","true"],["strikethrough",""]], 221 "<u>foo<span style=\"text-decoration:line-through\">[b</span><span style=\"color:rgb(0, 0, 255)\" id=\"foo\"><span style=\"text-decoration:line-through\">ar]</span>ba</span>z</u>", 222 [true,true], 223 {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], 224 ["<u>foo[b<span style=\"color:blue\" id=foo>ar]ba</span>z</u>", 225 [["stylewithcss","false"],["strikethrough",""]], 226 "<u>foo<strike>[b</strike><span style=\"color:rgb(0, 0, 255)\" id=\"foo\"><strike>ar]</strike>ba</span>z</u>", 227 [true,true], 228 {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], 229 ["<u>foo[b<span style=\"font-size:3em\">ar]ba</span>z</u>", 230 [["stylewithcss","true"],["strikethrough",""]], 231 "<u>foo<span style=\"text-decoration:line-through\">[b</span><span style=\"font-size:3em\"><span style=\"text-decoration:line-through\">ar]</span>ba</span>z</u>", 232 [true,true], 233 {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], 234 ["<u>foo[b<span style=\"font-size:3em\">ar]ba</span>z</u>", 235 [["stylewithcss","false"],["strikethrough",""]], 236 "<u>foo<strike>[b</strike><span style=\"font-size:3em\"><strike>ar]</strike>ba</span>z</u>", 237 [true,true], 238 {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], 239 ["<u>foo[b<i>ar]ba</i>z</u>", 240 [["stylewithcss","true"],["strikethrough",""]], 241 "<u>foo<span style=\"text-decoration:line-through\">[b</span><i><span style=\"text-decoration:line-through\">ar]</span>ba</i>z</u>", 242 [true,true], 243 {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], 244 ["<u>foo[b<i>ar]ba</i>z</u>", 245 [["stylewithcss","false"],["strikethrough",""]], 246 "<u>foo<strike>[b</strike><i><strike>ar]</strike>ba</i>z</u>", 247 [true,true], 248 {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], 249 ["<p style=\"text-decoration: underline\">foo[bar]baz</p>", 250 [["stylewithcss","true"],["strikethrough",""]], 251 "<p style=\"text-decoration:underline\">foo<span style=\"text-decoration:line-through\">[bar]</span>baz</p>", 252 [true,true], 253 {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], 254 ["<p style=\"text-decoration: underline\">foo[bar]baz</p>", 255 [["stylewithcss","false"],["strikethrough",""]], 256 "<p style=\"text-decoration:underline\">foo<strike>[bar]</strike>baz</p>", 257 [true,true], 258 {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], 259 ["foo<span style=\"text-decoration: line-through\">[bar]</span>baz", 260 [["stylewithcss","true"],["strikethrough",""]], 261 "foo[bar]baz", 262 [true,true], 263 {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}], 264 ["foo<span style=\"text-decoration: line-through\">[bar]</span>baz", 265 [["stylewithcss","false"],["strikethrough",""]], 266 "foo[bar]baz", 267 [true,true], 268 {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}], 269 // Should not replace existing <s> with <strike>/<span> when removing the style 270 // partially. 271 ["<s>foo[bar]baz</s>", 272 [["stylewithcss","true"],["strikethrough",""]], 273 "<s>foo</s>[bar]<s>baz</s>", 274 [true,true], 275 {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}], 276 ["<s>foo[bar]baz</s>", 277 [["stylewithcss","false"],["strikethrough",""]], 278 "<s>foo</s>[bar]<s>baz</s>", 279 [true,true], 280 {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}], 281 ["<s>foo[b<span style=\"color:blue\">ar]ba</span>z</s>", 282 [["stylewithcss","true"],["strikethrough",""]], 283 "<s>foo</s>b<span style=\"color:rgb(0, 0, 255)\">ar<span style=\"text-decoration-line:line-through\">ba</span></span><s>z</s>", 284 [true,true], 285 {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}], 286 ["<s>foo[b<span style=\"color:blue\">ar]ba</span>z</s>", 287 [["stylewithcss","false"],["strikethrough",""]], 288 "<s>foo</s>b<span style=\"color:rgb(0, 0, 255)\">ar<strike>ba</strike></span><s>z</s>", 289 [true,true], 290 {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}], 291 ["<s>foo[b<span style=\"color:blue\" id=foo>ar]ba</span>z</s>", 292 [["stylewithcss","true"],["strikethrough",""]], 293 "<s>foo</s>b<span style=\"color:rgb(0, 0, 255)\" id=\"foo\">ar<span style=\"text-decoration-line:line-through\">ba</span></span><s>z</s>", 294 [true,true], 295 {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}], 296 ["<s>foo[b<span style=\"color:blue\" id=foo>ar]ba</span>z</s>", 297 [["stylewithcss","false"],["strikethrough",""]], 298 "<s>foo</s>b<span style=\"color:rgb(0, 0, 255)\" id=\"foo\">ar<strike>ba</strike></span><s>z</s>", 299 [true,true], 300 {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}], 301 ["<s>foo[b<span style=\"font-size:3em\">ar]ba</span>z</s>", 302 [["stylewithcss","true"],["strikethrough",""]], 303 "<s>foo</s>b<span style=\"font-size:3em\">ar<span style=\"text-decoration-line:line-through\">ba</span></span><s>z</s>", 304 [true,true], 305 {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}], 306 ["<s>foo[b<span style=\"font-size:3em\">ar]ba</span>z</s>", 307 [["stylewithcss","false"],["strikethrough",""]], 308 "<s>foo</s>b<span style=\"font-size:3em\">ar<strike>ba</strike></span><s>z</s>", 309 [true,true], 310 {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}], 311 ["<s>foo[b<i>ar]ba</i>z</s>", 312 [["stylewithcss","true"],["strikethrough",""]], 313 "<s>foo</s>b<i>ar<span style=\"text-decoration-line:line-through\">ba</span></i><s>z</s>", 314 [true,true], 315 {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}], 316 ["<s>foo[b<i>ar]ba</i>z</s>", 317 [["stylewithcss","false"],["strikethrough",""]], 318 "<s>foo</s>b<i>ar<strike>ba</strike></i><s>z</s>", 319 [true,true], 320 {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}], 321 ["foo<strike>[bar]</strike>baz", 322 [["stylewithcss","true"],["strikethrough",""]], 323 "foo[bar]baz", 324 [true,true], 325 {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}], 326 ["foo<strike>[bar]</strike>baz", 327 [["stylewithcss","false"],["strikethrough",""]], 328 "foo[bar]baz", 329 [true,true], 330 {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}], 331 ["<strike>foo[bar]baz</strike>", 332 [["stylewithcss","true"],["strikethrough",""]], 333 "<span style=\"text-decoration:line-through\">foo</span>[bar]<span style=\"text-decoration:line-through\">baz</span>", 334 [true,true], 335 {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}], 336 ["<strike>foo[bar]baz</strike>", 337 [["stylewithcss","false"],["strikethrough",""]], 338 "<strike>foo</strike>[bar]<strike>baz</strike>", 339 [true,true], 340 {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}], 341 ["<strike>foo[b<span style=\"color:blue\">ar]ba</span>z</strike>", 342 [["stylewithcss","true"],["strikethrough",""]], 343 "<span style=\"text-decoration:line-through\">foo</span>[b<span style=\"color:rgb(0, 0, 255)\">ar]<span style=\"text-decoration:line-through\">ba</span></span><span style=\"text-decoration:line-through\">z</span>", 344 [true,true], 345 {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}], 346 ["<strike>foo[b<span style=\"color:blue\">ar]ba</span>z</strike>", 347 [["stylewithcss","false"],["strikethrough",""]], 348 "<strike>foo</strike>[b<span style=\"color:rgb(0, 0, 255)\">ar]<strike>ba</strike></span><strike>z</strike>", 349 [true,true], 350 {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}], 351 ["<strike>foo[b<span style=\"color:blue\" id=foo>ar]ba</span>z</strike>", 352 [["stylewithcss","true"],["strikethrough",""]], 353 "<span style=\"text-decoration:line-through\">foo</span>[b<span style=\"color:rgb(0, 0, 255)\" id=\"foo\">ar]<span style=\"text-decoration:line-through\">ba</span></span><span style=\"text-decoration:line-through\">z</span>", 354 [true,true], 355 {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}], 356 ["<strike>foo[b<span style=\"color:blue\" id=foo>ar]ba</span>z</strike>", 357 [["stylewithcss","false"],["strikethrough",""]], 358 "<strike>foo</strike>[b<span style=\"color:rgb(0, 0, 255)\" id=\"foo\">ar]<strike>ba</strike></span><strike>z</strike>", 359 [true,true], 360 {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}], 361 ["<strike>foo[b<span style=\"font-size:3em\">ar]ba</span>z</strike>", 362 [["stylewithcss","true"],["strikethrough",""]], 363 "<span style=\"text-decoration:line-through\">foo</span>[b<span style=\"font-size:3em\">ar]<span style=\"text-decoration:line-through\">ba</span></span><span style=\"text-decoration:line-through\">z</span>", 364 [true,true], 365 {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}], 366 ["<strike>foo[b<span style=\"font-size:3em\">ar]ba</span>z</strike>", 367 [["stylewithcss","false"],["strikethrough",""]], 368 "<strike>foo</strike>[b<span style=\"font-size:3em\">ar]<strike>ba</strike></span><strike>z</strike>", 369 [true,true], 370 {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}], 371 ["<strike>foo[b<i>ar]ba</i>z</strike>", 372 [["stylewithcss","true"],["strikethrough",""]], 373 "<span style=\"text-decoration:line-through\">foo</span>[b<i>ar]<span style=\"text-decoration:line-through\">ba</span></i><span style=\"text-decoration:line-through\">z</span>", 374 [true,true], 375 {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}], 376 ["<strike>foo[b<i>ar]ba</i>z</strike>", 377 [["stylewithcss","false"],["strikethrough",""]], 378 "<strike>foo</strike>[b<i>ar]<strike>ba</strike></i><strike>z</strike>", 379 [true,true], 380 {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}], 381 // Should set text-decoration of <ins> because it has underline style by 382 // default and it is not only representing it, thus, replacing it with <span> 383 // changes the meaning. 384 ["foo<ins>[bar]</ins>baz", 385 [["stylewithcss","true"],["strikethrough",""]], 386 "foo<ins style=\"text-decoration:underline line-through\">[bar]</ins>baz", 387 [true,true], 388 {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], 389 ["foo<ins>[bar]</ins>baz", 390 [["stylewithcss","false"],["strikethrough",""]], 391 "foo<ins><strike>[bar]</strike></ins>baz", 392 [true,true], 393 {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], 394 ["<ins>foo[bar]baz</ins>", 395 [["stylewithcss","true"],["strikethrough",""]], 396 "<ins>foo<span style=\"text-decoration:line-through\">[bar]</span>baz</ins>", 397 [true,true], 398 {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], 399 ["<ins>foo[bar]baz</ins>", 400 [["stylewithcss","false"],["strikethrough",""]], 401 "<ins>foo<strike>[bar]</strike>baz</ins>", 402 [true,true], 403 {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], 404 ["<ins>foo[b<span style=\"color:blue\">ar]ba</span>z</ins>", 405 [["stylewithcss","true"],["strikethrough",""]], 406 "<ins>foo<span style=\"text-decoration:line-through\">[b</span><span style=\"color:rgb(0, 0, 255)\"><span style=\"text-decoration:line-through\">ar]</span>ba</span>z</ins>", 407 [true,true], 408 {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], 409 ["<ins>foo[b<span style=\"color:blue\">ar]ba</span>z</ins>", 410 [["stylewithcss","false"],["strikethrough",""]], 411 "<ins>foo<strike>[b</strike><span style=\"color:rgb(0, 0, 255)\"><strike>ar]</strike>ba</span>z</ins>", 412 [true,true], 413 {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], 414 ["<ins>foo[b<span style=\"color:blue\" id=foo>ar]ba</span>z</ins>", 415 [["stylewithcss","true"],["strikethrough",""]], 416 "<ins>foo<span style=\"text-decoration:line-through\">[b</span><span style=\"color:rgb(0, 0, 255)\" id=\"foo\"><span style=\"text-decoration:line-through\">ar]</span>ba</span>z</ins>", 417 [true,true], 418 {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], 419 ["<ins>foo[b<span style=\"color:blue\" id=foo>ar]ba</span>z</ins>", 420 [["stylewithcss","false"],["strikethrough",""]], 421 "<ins>foo<strike>[b</strike><span style=\"color:rgb(0, 0, 255)\" id=\"foo\"><strike>ar]</strike>ba</span>z</ins>", 422 [true,true], 423 {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], 424 ["<ins>foo[b<span style=\"font-size:3em\">ar]ba</span>z</ins>", 425 [["stylewithcss","true"],["strikethrough",""]], 426 "<ins>foo<span style=\"text-decoration:line-through\">[b</span><span style=\"font-size:3em\"><span style=\"text-decoration:line-through\">ar]</span>ba</span>z</ins>", 427 [true,true], 428 {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], 429 ["<ins>foo[b<span style=\"font-size:3em\">ar]ba</span>z</ins>", 430 [["stylewithcss","false"],["strikethrough",""]], 431 "<ins>foo<strike>[b</strike><span style=\"font-size:3em\"><strike>ar]</strike>ba</span>z</ins>", 432 [true,true], 433 {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], 434 ["<ins>foo[b<i>ar]ba</i>z</ins>", 435 [["stylewithcss","true"],["strikethrough",""]], 436 "<ins>foo<span style=\"text-decoration:line-through\">[b</span><i><span style=\"text-decoration:line-through\">ar]</span>ba</i>z</ins>", 437 [true,true], 438 {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], 439 ["<ins>foo[b<i>ar]ba</i>z</ins>", 440 [["stylewithcss","false"],["strikethrough",""]], 441 "<ins>foo<strike>[b</strike><i><strike>ar]</strike>ba</i>z</ins>", 442 [true,true], 443 {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], 444 ["foo<del>[bar]</del>baz", 445 [["strikethrough",""]], 446 "foo<del>[bar]</del>baz", 447 [true], 448 {"strikethrough":[false,true,"",false,true,""]}], 449 ["<del>foo[bar]baz</del>", 450 [["strikethrough",""]], 451 "<del>foo[bar]baz</del>", 452 [true], 453 {"strikethrough":[false,true,"",false,true,""]}], 454 ["<del>foo[b<span style=\"color:blue\">ar]ba</span>z</del>", 455 [["strikethrough",""]], 456 "<del>foo[b<span style=\"color:rgb(0, 0, 255)\">ar]ba</span>z</del>", 457 [true], 458 {"strikethrough":[false,true,"",false,true,""]}], 459 ["<del>foo[b<span style=\"color:blue\" id=foo>ar]ba</span>z</del>", 460 [["strikethrough",""]], 461 "<del>foo[b<span style=\"color:rgb(0, 0, 255)\" id=\"foo\">ar]ba</span>z</del>", 462 [true], 463 {"strikethrough":[false,true,"",false,true,""]}], 464 ["<del>foo[b<span style=\"font-size:3em\">ar]ba</span>z</del>", 465 [["strikethrough",""]], 466 "<del>foo[b<span style=\"font-size:3em\">ar]ba</span>z</del>", 467 [true], 468 {"strikethrough":[false,true,"",false,true,""]}], 469 ["<del>foo[b<i>ar]ba</i>z</del>", 470 [["strikethrough",""]], 471 "<del>foo[b<i>ar]ba</i>z</del>", 472 [true], 473 {"strikethrough":[false,true,"",false,true,""]}], 474 ["foo<span style=\"text-decoration: underline line-through\">[bar]</span>baz", 475 [["strikethrough",""]], 476 "foo<span style=\"text-decoration:underline\">[bar]</span>baz", 477 [true], 478 {"strikethrough":[false,true,"",false,false,""]}], 479 ["foo<span style=\"text-decoration: underline line-through\">b[a]r</span>baz", 480 [["stylewithcss","true"],["strikethrough",""]], 481 "foo<span style=\"text-decoration:underline\"><span style=\"text-decoration:line-through\">b</span>[a]<span style=\"text-decoration:line-through\">r</span></span>baz", 482 [true,true], 483 {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}], 484 ["foo<span style=\"text-decoration: underline line-through\">b[a]r</span>baz", 485 [["stylewithcss","false"],["strikethrough",""]], 486 "foo<span style=\"text-decoration:underline\"><strike>b</strike>[a]<strike>r</strike></span>baz", 487 [true,true], 488 {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}], 489 // <s> should be replaced with <strike> or <span> element. 490 ["foo<s style=\"text-decoration: underline\">[bar]</s>baz", 491 [["stylewithcss","true"],["strikethrough",""]], 492 "foo<span style=\"text-decoration-line:underline line-through\">bar</span>baz", 493 [true,true], 494 {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], 495 ["foo<s style=\"text-decoration: underline\">[bar]</s>baz", 496 [["stylewithcss","false"],["strikethrough",""]], 497 "foo<u><strike>bar</strike></u>baz", 498 [true,true], 499 {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], 500 ["foo<s style=\"text-decoration: underline\">b[a]r</s>baz", 501 [["stylewithcss","true"],["strikethrough",""]], 502 "foo<s style=\"text-decoration:underline\">b</s><span style=\"text-decoration-line:underline line-through\">a</span><s style=\"text-decoration:underline\">r</s>baz", 503 [true,true], 504 {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], 505 ["foo<s style=\"text-decoration: underline\">b[a]r</s>baz", 506 [["stylewithcss","false"],["strikethrough",""]], 507 "foo<s style=\"text-decoration:underline\">b</s><u><strike>a</strike></u><s style=\"text-decoration:underline\">r</s>baz", 508 [true,true], 509 {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], 510 ["foo<u style=\"text-decoration: line-through\">[bar]</u>baz", 511 [["stylewithcss","true"],["strikethrough",""]], 512 "foo[bar]baz", 513 [true,true], 514 {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}], 515 ["foo<u style=\"text-decoration: line-through\">[bar]</u>baz", 516 [["stylewithcss","false"],["strikethrough",""]], 517 "foo[bar]baz", 518 [true,true], 519 {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}], 520 ["foo<u style=\"text-decoration: line-through\">b[a]r</u>baz", 521 [["stylewithcss","true"],["strikethrough",""]], 522 "foo<span style=\"text-decoration:line-through\">b</span>[a]<span style=\"text-decoration:line-through\">r</span>baz", 523 [true,true], 524 {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}], 525 ["foo<u style=\"text-decoration: line-through\">b[a]r</u>baz", 526 [["stylewithcss","false"],["strikethrough",""]], 527 "foo<strike>b</strike>[a]<strike>r</strike>baz", 528 [true,true], 529 {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}], 530 ["foo<s style=\"text-decoration: overline\">[bar]</s>baz", 531 [["stylewithcss","true"],["strikethrough",""]], 532 "foo<span style=\"text-decoration-line:overline line-through\">bar</span>baz", 533 [true,true], 534 {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], 535 ["foo<s style=\"text-decoration: overline\">[bar]</s>baz", 536 [["stylewithcss","false"],["strikethrough",""]], 537 "foo<span style=\"text-decoration-line:overline\"><strike>bar</strike></span>baz", 538 [true,true], 539 {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], 540 ["foo<s style=\"text-decoration: overline\">b[a]r</s>baz", 541 [["stylewithcss","true"],["strikethrough",""]], 542 "foo<s style=\"text-decoration:overline\">b</s><span style=\"text-decoration-line:overline line-through\">a</span><s style=\"text-decoration:overline\">r</s>baz", 543 [true,true], 544 {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], 545 ["foo<s style=\"text-decoration: overline\">b[a]r</s>baz", 546 [["stylewithcss","false"],["strikethrough",""]], 547 "foo<s style=\"text-decoration:overline\">b</s><span style=\"text-decoration-line:overline\"><strike>a</strike></span><s style=\"text-decoration:overline\">r</s>baz", 548 [true,true], 549 {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], 550 // Should replace <u> with new <span> and set its `text-decoration` to 551 // line-though (for applying the requested style) and overline (which was 552 // specified to the <u>). Note that underline was removed by the 553 // text-decoration setting. Therefore, it should not appear. 554 ["foo<u style=\"text-decoration: overline\">[bar]</u>baz", 555 [["stylewithcss","true"],["strikethrough",""]], 556 "foo<span style=\"text-decoration:overline line-through\">[bar]</span>baz", 557 [true,true], 558 {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], 559 ["foo<u style=\"text-decoration: overline\">[bar]</u>baz", 560 [["stylewithcss","false"],["strikethrough",""]], 561 "foo<strike><u style=\"text-decoration:overline\">[bar]</u></strike>baz", 562 [true,true], 563 {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], 564 ["foo<u style=\"text-decoration: overline\">b[a]r</u>baz", 565 [["stylewithcss","true"],["strikethrough",""]], 566 "foo<u style=\"text-decoration:overline\">b<span style=\"text-decoration:line-through\">[a]</span>r</u>baz", 567 [true,true], 568 {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], 569 ["foo<u style=\"text-decoration: overline\">b[a]r</u>baz", 570 [["stylewithcss","false"],["strikethrough",""]], 571 "foo<u style=\"text-decoration:overline\">b<strike>[a]</strike>r</u>baz", 572 [true,true], 573 {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], 574 ["<p style=\"text-decoration: line-through\">foo[bar]baz</p>", 575 [["stylewithcss","true"],["strikethrough",""]], 576 "<p><span style=\"text-decoration:line-through\">foo</span>[bar]<span style=\"text-decoration:line-through\">baz</span></p>", 577 [true,true], 578 {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}], 579 ["<p style=\"text-decoration: line-through\">foo[bar]baz</p>", 580 [["stylewithcss","false"],["strikethrough",""]], 581 "<p><strike>foo</strike>[bar]<strike>baz</strike></p>", 582 [true,true], 583 {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}], 584 ["<p style=\"text-decoration: overline\">foo[bar]baz</p>", 585 [["stylewithcss","true"],["strikethrough",""]], 586 "<p style=\"text-decoration:overline\">foo<span style=\"text-decoration:line-through\">[bar]</span>baz</p>", 587 [true,true], 588 {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], 589 ["<p style=\"text-decoration: overline\">foo[bar]baz</p>", 590 [["stylewithcss","false"],["strikethrough",""]], 591 "<p style=\"text-decoration:overline\">foo<strike>[bar]</strike>baz</p>", 592 [true,true], 593 {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], 594 ["foo<span class=\"underline\">[bar]</span>baz", 595 [["stylewithcss","true"],["strikethrough",""]], 596 "foo<span class=\"underline\" style=\"text-decoration:line-through\">bar</span>baz", 597 [true,true], 598 {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], 599 ["foo<span class=\"underline\">[bar]</span>baz", 600 [["stylewithcss","false"],["strikethrough",""]], 601 "foo<span class=\"underline\"><strike>[bar]</strike></span>baz", 602 [true,true], 603 {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], 604 ["foo<span class=\"underline\">b[a]r</span>baz", 605 [["stylewithcss","true"],["strikethrough",""]], 606 "foo<span class=\"underline\">b<span style=\"text-decoration:line-through\">[a]</span>r</span>baz", 607 [true,true], 608 {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,false,"",false,true,""]}], 609 ["foo<span class=\"underline\">b[a]r</span>baz", 610 [["stylewithcss","false"],["strikethrough",""]], 611 "foo<span class=\"underline\">b<strike>[a]</strike>r</span>baz", 612 [true,true], 613 {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,false,"",false,true,""]}], 614 ["foo<span class=\"line-through\">[bar]</span>baz", 615 [["strikethrough",""]], 616 "foo<span class=\"line-through\">[bar]</span>baz", 617 [true], 618 {"strikethrough":[false,true,"",false,true,""]}], 619 ["foo<span class=\"line-through\">b[a]r</span>baz", 620 [["strikethrough",""]], 621 "foo<span class=\"line-through\">b[a]r</span>baz", 622 [true], 623 {"strikethrough":[false,true,"",false,true,""]}], 624 ["foo<span class=\"underline-and-line-through\">[bar]</span>baz", 625 [["strikethrough",""]], 626 "foo<span class=\"underline-and-line-through\">[bar]</span>baz", 627 [true], 628 {"strikethrough":[false,true,"",false,true,""]}], 629 ["foo<span class=\"underline-and-line-through\">b[a]r</span>baz", 630 [["strikethrough",""]], 631 "foo<span class=\"underline-and-line-through\">b[a]r</span>baz", 632 [true], 633 {"strikethrough":[false,true,"",false,true,""]}], 634 // Should wrap in new <strike> only when it's not wrapped in <s> 635 ["fo[o<s>b]ar</s>baz", 636 [["strikethrough",""]], 637 "fo<strike>o</strike><s>bar</s>baz", 638 [true], 639 {"strikethrough":[true,false,"",false,true,""]}], 640 ["foo<s>ba[r</s>b]az", 641 [["strikethrough",""]], 642 "foo<s>ba</s>rbaz", 643 [true], 644 {"strikethrough":[true,false,"",false,true,""]}], 645 ["fo[o<s>bar</s>b]az", 646 [["stylewithcss","true"],["strikethrough",""]], 647 "fo<span style=\"text-decoration-line:line-through\">obarb</span>az", 648 [true,true], 649 {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[true,false,"",false,true,""]}], 650 ["fo[o<s>bar</s>b]az", 651 [["stylewithcss","false"],["strikethrough",""]], 652 "fo<strike>obarb</strike>az", 653 [true,true], 654 {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[true,false,"",false,true,""]}], 655 ["foo[<s>b]ar</s>baz", 656 [["stylewithcss","true"],["strikethrough",""]], 657 "foo[b]<s>ar</s>baz", 658 [true,true], 659 {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}], 660 ["foo[<s>b]ar</s>baz", 661 [["stylewithcss","false"],["strikethrough",""]], 662 "foo[b]<s>ar</s>baz", 663 [true,true], 664 {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}], 665 ["foo<s>ba[r</s>]baz", 666 [["stylewithcss","true"],["strikethrough",""]], 667 "foo<s>ba</s>[r]baz", 668 [true,true], 669 {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}], 670 ["foo<s>ba[r</s>]baz", 671 [["stylewithcss","false"],["strikethrough",""]], 672 "foo<s>ba</s>[r]baz", 673 [true,true], 674 {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}], 675 ["foo[<s>bar</s>]baz", 676 [["stylewithcss","true"],["strikethrough",""]], 677 "foo[bar]baz", 678 [true,true], 679 {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}], 680 ["foo[<s>bar</s>]baz", 681 [["stylewithcss","false"],["strikethrough",""]], 682 "foo[bar]baz", 683 [true,true], 684 {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}], 685 ["foo<s>[bar]</s>baz", 686 [["stylewithcss","true"],["strikethrough",""]], 687 "foo[bar]baz", 688 [true,true], 689 {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}], 690 ["foo<s>[bar]</s>baz", 691 [["stylewithcss","false"],["strikethrough",""]], 692 "foo[bar]baz", 693 [true,true], 694 {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}], 695 ["foo{<s>bar</s>}baz", 696 [["stylewithcss","true"],["strikethrough",""]], 697 "foo{bar}baz", 698 [true,true], 699 {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}], 700 ["foo{<s>bar</s>}baz", 701 [["stylewithcss","false"],["strikethrough",""]], 702 "foo{bar}baz", 703 [true,true], 704 {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}], 705 ["fo[o<span style=text-decoration:line-through>b]ar</span>baz", 706 [["strikethrough",""]], 707 "fo<strike>o</strike><s>bar</s>baz", 708 [true], 709 {"strikethrough":[true,false,"",false,true,""]}], 710 ["<strike>fo[o</strike><s>b]ar</s>", 711 [["stylewithcss","true"],["strikethrough",""]], 712 "<strike>fo</strike>[ob]<s>ar</s>", 713 [true,true], 714 {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",false,false,""]}], 715 ["<strike>fo[o</strike><s>b]ar</s>", 716 [["stylewithcss","false"],["strikethrough",""]], 717 "<strike>fo</strike>[ob]<s>ar</s>", 718 [true,true], 719 {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",false,false,""]}], 720 ["<s>fo[o</s><del>b]ar</del>", 721 [["stylewithcss","true"],["strikethrough",""]], 722 "<s>fo</s>[o<del>b]ar</del>", 723 [true,true], 724 {"stylewithcss":[false,false,"",false,true,""],"strikethrough":[false,true,"",true,false,""]}], 725 ["<s>fo[o</s><del>b]ar</del>", 726 [["stylewithcss","false"],["strikethrough",""]], 727 "<s>fo</s>[o<del>b]ar</del>", 728 [true,true], 729 {"stylewithcss":[false,true,"",false,false,""],"strikethrough":[false,true,"",true,false,""]}], 730 731 732 // Tests to remove only strikethrough from existing text-decoration 733 ["abc<span style=\"text-decoration:line-through overline underline\">[def]</span>ghi", 734 [["stylewithcss","true"],["strikethrough",""]], 735 ["abc<span style=\"text-decoration:underline overline\">[def]</span>ghi", 736 "abc<span style=\"text-decoration-line:underline overline\">[def]</span>ghi"], 737 [true,true], 738 {}], 739 740 // blink, text-decoration-color and text-decoration-style values should be 741 // dropped. This rule is odd because executing "underline" command causes 742 // the data loss, but for now, the compatibility between browsers is more 743 // important. Once you want/need to change the behavior of a browser, you 744 // should file a spec issue first. 745 // And these tests allows the difference between text-decoration vs. 746 // text-decoration-line because these tests want to check the data loss. 747 ["abc<span style=\"text-decoration:blink overline underline\">[def]</span>ghi", 748 [["stylewithcss","true"],["strikethrough",""]], 749 ["abc<span style=\"text-decoration:underline overline line-through\">[def]</span>ghi", 750 "abc<span style=\"text-decoration-line:underline overline line-through\">[def]</span>ghi"], 751 [true,true], 752 {}], 753 ["abc<span style=\"text-decoration:underline blue dotted\">[def]</span>ghi", 754 [["stylewithcss","true"],["strikethrough",""]], 755 ["abc<span style=\"text-decoration:underline line-through\">[def]</span>ghi", 756 "abc<span style=\"text-decoration-line:underline line-through\">[def]</span>ghi"], 757 [true,true], 758 {}], 759 ["abc<span style=\"text-decoration:blink line-through underline overline\">[def]</span>ghi", 760 [["stylewithcss","true"],["strikethrough",""]], 761 ["abc<span style=\"text-decoration:underline overline\">[def]</span>ghi", 762 "abc<span style=\"text-decoration-line:underline overline\">[def]</span>ghi"], 763 [true,true], 764 {}], 765 ["abc<span style=\"text-decoration:underline line-through blue dotted\">[def]</span>ghi", 766 [["stylewithcss","true"],["strikethrough",""]], 767 ["abc<span style=\"text-decoration:underline\">[def]</span>ghi", 768 "abc<span style=\"text-decoration-line:underline\">[def]</span>ghi"], 769 [true,true], 770 {}], 771 772 // Should not change the style of the non-editable nodes so that only the 773 // visible and editable nodes are wrapped into the <strike> elements. 774 ['{ <span contenteditable="false">A</span> ; <span contenteditable="false">B</span> ; <span contenteditable="false">C</span> }', 775 [["stylewithcss","false"],["strikethrough",""]], 776 ' <span contenteditable="false">A</span><strike> ; </strike><span contenteditable="false">B</span><strike> ; </strike><span contenteditable="false">C</span> ', 777 [true,true], 778 {}], 779 ]