Skip to content

Commit 2c1fd97

Browse files
committed
Improve selector and binominal look ahead (#2346)
Make more permissive and allow spaces around dashes.
1 parent fb5acbf commit 2c1fd97

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
@@ -1577,14 +1577,15 @@ namespace Sass {
15771577
class_char < selector_lookahead_ops >,
15781578
// match selector combinators /[>+~]/
15791579
class_char < selector_combinator_ops >,
1580-
// match attribute compare operators
1580+
// match pseudo selectors
15811581
sequence <
15821582
exactly <'('>,
15831583
optional_spaces,
15841584
optional <re_selector_list>,
15851585
optional_spaces,
15861586
exactly <')'>
15871587
>,
1588+
// match attribute compare operators
15881589
alternatives <
15891590
exact_match, class_match, dash_match,
15901591
prefix_match, suffix_match, substring_match
@@ -1612,7 +1613,12 @@ namespace Sass {
16121613
// accept hypens in token
16131614
one_plus < sequence <
16141615
// can start with hyphens
1615-
zero_plus < exactly<'-'> >,
1616+
zero_plus <
1617+
sequence <
1618+
exactly <'-'>,
1619+
optional_spaces
1620+
>
1621+
>,
16161622
// now the main token
16171623
alternatives <
16181624
kwd_optional,

0 commit comments

Comments
 (0)