Skip to content

Commit

Permalink
fix: add regex for parent nested selector (#58)
Browse files Browse the repository at this point in the history
Co-authored-by: Nikita Almanov <131481562+nikkeyl@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and nikkeyl authored Feb 19, 2024
1 parent a0a5097 commit 3d928b7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/properties/order.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ const propertiesOrder = {
createRule(REGEXP.NESTED.ATTRIBUTE),
createRule(REGEXP.NESTED.CLASS),
createRule(REGEXP.NESTED.MODIFIER),
createRule(REGEXP.NESTED.PARENT),
'rules',
createAtRule('include', true),
'at-rules',
Expand Down
3 changes: 3 additions & 0 deletions src/utils/regexps.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ const REGEXP = {
ATTRIBUTE: '\\[[^\\[\\]]+\\]',
CLASS: '\\..+',
MODIFIER: '--.+',
// The '?' is used to define the '&' sign at the beginning,
// which is added in createRule()
PARENT: '?.* &',
},
};

Expand Down

0 comments on commit 3d928b7

Please sign in to comment.