Skip to content

Commit

Permalink
Improve selector and binominal look ahead (sass#2346)
Browse files Browse the repository at this point in the history
Make more permissive and allow spaces around dashes.
  • Loading branch information
mgreter committed May 20, 2017
1 parent 4d5d61d commit e9c584b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/prelexer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1600,14 +1600,15 @@ namespace Sass {
class_char < selector_lookahead_ops >,
// match selector combinators /[>+~]/
class_char < selector_combinator_ops >,
// match attribute compare operators
// match pseudo selectors
sequence <
exactly <'('>,
optional_spaces,
optional <re_selector_list>,
optional_spaces,
exactly <')'>
>,
// match attribute compare operators
alternatives <
exact_match, class_match, dash_match,
prefix_match, suffix_match, substring_match
Expand Down Expand Up @@ -1635,7 +1636,12 @@ namespace Sass {
// accept hypens in token
one_plus < sequence <
// can start with hyphens
zero_plus < exactly<'-'> >,
zero_plus <
sequence <
exactly <'-'>,
optional_spaces
>
>,
// now the main token
alternatives <
kwd_optional,
Expand Down

0 comments on commit e9c584b

Please sign in to comment.