Skip to content

Commit b7f12f4

Browse files
committed
Use spaces for indenting regular expressions
There is no need to use tabs here, and now the indentation is consistent with the indentation used for the PHP code.
1 parent e500be4 commit b7f12f4

File tree

2 files changed

+41
-41
lines changed

2 files changed

+41
-41
lines changed

src/Property/KeyframeSelector.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ class KeyframeSelector extends Selector
1010
* @var string
1111
*/
1212
const SELECTOR_VALIDATION_RX = '/
13-
^(
14-
(?:
15-
[a-zA-Z0-9\x{00A0}-\x{FFFF}_^$|*="\'~\[\]()\-\s\.:#+>]* # any sequence of valid unescaped characters
16-
(?:\\\\.)? # a single escaped character
17-
(?:([\'"]).*?(?<!\\\\)\2)? # a quoted text like [id="example"]
18-
)*
19-
)|
20-
(\d+%) # keyframe animation progress percentage (e.g. 50%)
21-
$
22-
/ux';
13+
^(
14+
(?:
15+
[a-zA-Z0-9\x{00A0}-\x{FFFF}_^$|*="\'~\[\]()\-\s\.:#+>]* # any sequence of valid unescaped characters
16+
(?:\\\\.)? # a single escaped character
17+
(?:([\'"]).*?(?<!\\\\)\2)? # a quoted text like [id="example"]
18+
)*
19+
)|
20+
(\d+%) # keyframe animation progress percentage (e.g. 50%)
21+
$
22+
/ux';
2323
}

src/Property/Selector.php

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)