@@ -14,51 +14,51 @@ class Selector
1414 * @var string
1515 */
1616 const NON_ID_ATTRIBUTES_AND_PSEUDO_CLASSES_RX = '/
17- (\.[\w]+) # classes
18- |
19- \[(\w+) # attributes
20- |
21- (\:( # pseudo classes
22- link|visited|active
23- |hover|focus
24- |lang
25- |target
26- |enabled|disabled|checked|indeterminate
27- |root
28- |nth-child|nth-last-child|nth-of-type|nth-last-of-type
29- |first-child|last-child|first-of-type|last-of-type
30- |only-child|only-of-type
31- |empty|contains
32- ))
33- /ix ' ;
17+ (\.[\w]+) # classes
18+ |
19+ \[(\w+) # attributes
20+ |
21+ (\:( # pseudo classes
22+ link|visited|active
23+ |hover|focus
24+ |lang
25+ |target
26+ |enabled|disabled|checked|indeterminate
27+ |root
28+ |nth-child|nth-last-child|nth-of-type|nth-last-of-type
29+ |first-child|last-child|first-of-type|last-of-type
30+ |only-child|only-of-type
31+ |empty|contains
32+ ))
33+ /ix ' ;
3434
3535 /**
3636 * regexp for specificity calculations
3737 *
3838 * @var string
3939 */
4040 const ELEMENTS_AND_PSEUDO_ELEMENTS_RX = '/
41- ((^|[\s\+\>\~]+)[\w]+ # elements
42- |
43- \:{1,2}( # pseudo-elements
44- after|before|first-letter|first-line|selection
45- ))
46- /ix ' ;
41+ ((^|[\s\+\>\~]+)[\w]+ # elements
42+ |
43+ \:{1,2}( # pseudo-elements
44+ after|before|first-letter|first-line|selection
45+ ))
46+ /ix ' ;
4747
4848 /**
4949 * regexp for specificity calculations
5050 *
5151 * @var string
5252 */
5353 const SELECTOR_VALIDATION_RX = '/
54- ^(
55- (?:
56- [a-zA-Z0-9\x{00A0}-\x{FFFF}_^$|*=" \'~\[\]()\-\s\.:#+>]* # any sequence of valid unescaped characters
57- (?: \\\\.)? # a single escaped character
58- (?:([ \'"]).*?(?<! \\\\)\2)? # a quoted text like [id="example"]
59- )*
60- )$
61- /ux ' ;
54+ ^(
55+ (?:
56+ [a-zA-Z0-9\x{00A0}-\x{FFFF}_^$|*=" \'~\[\]()\-\s\.:#+>]* # any sequence of valid unescaped characters
57+ (?: \\\\.)? # a single escaped character
58+ (?:([ \'"]).*?(?<! \\\\)\2)? # a quoted text like [id="example"]
59+ )*
60+ )$
61+ /ux ' ;
6262
6363 /**
6464 * @var string
0 commit comments