LEFT | RIGHT |
1 "use strict"; | 1 "use strict"; |
2 | 2 |
3 { | 3 { |
4 let {Filter, ElemHideFilter} = require("filterClasses"); | 4 const {Filter, ElemHideFilter} = require("filterClasses"); |
5 let {escapeCSS, quoteCSS} = require("filterComposer"); | 5 const {escapeCSS, quoteCSS} = require("filterComposer"); |
6 | 6 |
7 module("CSS escaping"); | 7 module("CSS escaping"); |
8 | 8 |
9 test("CSS escaping", () => | 9 test("CSS escaping", () => |
10 { | 10 { |
11 function testSelector(opts) | 11 function testSelector(opts) |
12 { | 12 { |
13 let mustMatch = opts.mustMatch !== false; | 13 let mustMatch = opts.mustMatch !== false; |
14 let doc = document.implementation.createHTMLDocument(); | 14 let doc = document.implementation.createHTMLDocument(); |
15 | 15 |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 testEscape("x" + chr); | 96 testEscape("x" + chr); |
97 | 97 |
98 // Leading dashes must be escaped, when followed by certain characters. | 98 // Leading dashes must be escaped, when followed by certain characters. |
99 testEscape("-" + chr); | 99 testEscape("-" + chr); |
100 } | 100 } |
101 | 101 |
102 // Test some non-ASCII characters. However, those shouldn't require escaping
. | 102 // Test some non-ASCII characters. However, those shouldn't require escaping
. |
103 testEscape("\uD83D\uDE3B\u2665\u00E4"); | 103 testEscape("\uD83D\uDE3B\u2665\u00E4"); |
104 }); | 104 }); |
105 } | 105 } |
LEFT | RIGHT |