Skip to content

Commit f2f5b54

Browse files
authored
Merge pull request #2390 from mgreter/bugfix/issue-2346
Improve selector and binominal look ahead (#2346)
2 parents f890f13 + e9c584b commit f2f5b54

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/prelexer.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1600,14 +1600,15 @@ namespace Sass {
16001600
class_char < selector_lookahead_ops >,
16011601
// match selector combinators /[>+~]/
16021602
class_char < selector_combinator_ops >,
1603-
// match attribute compare operators
1603+
// match pseudo selectors
16041604
sequence <
16051605
exactly <'('>,
16061606
optional_spaces,
16071607
optional <re_selector_list>,
16081608
optional_spaces,
16091609
exactly <')'>
16101610
>,
1611+
// match attribute compare operators
16111612
alternatives <
16121613
exact_match, class_match, dash_match,
16131614
prefix_match, suffix_match, substring_match
@@ -1635,7 +1636,12 @@ namespace Sass {
16351636
// accept hypens in token
16361637
one_plus < sequence <
16371638
// can start with hyphens
1638-
zero_plus < exactly<'-'> >,
1639+
zero_plus <
1640+
sequence <
1641+
exactly <'-'>,
1642+
optional_spaces
1643+
>
1644+
>,
16391645
// now the main token
16401646
alternatives <
16411647
kwd_optional,

0 commit comments

Comments
 (0)