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