From e9c584b427fcb3f0320b0827ecab5c9a485f1fe2 Mon Sep 17 00:00:00 2001 From: Marcel Greter Date: Sun, 21 May 2017 01:41:06 +0200 Subject: [PATCH] Improve selector and binominal look ahead (#2346) Make more permissive and allow spaces around dashes. --- src/prelexer.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/prelexer.cpp b/src/prelexer.cpp index 8790d2c3f..ba924fd9b 100644 --- a/src/prelexer.cpp +++ b/src/prelexer.cpp @@ -1600,7 +1600,7 @@ 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, @@ -1608,6 +1608,7 @@ namespace Sass { optional_spaces, exactly <')'> >, + // match attribute compare operators alternatives < exact_match, class_match, dash_match, prefix_match, suffix_match, substring_match @@ -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,