Skip to content

Commit

Permalink
Fix regression in parsing selector with trailing escaped colon
Browse files Browse the repository at this point in the history
  • Loading branch information
xzyfer committed Mar 30, 2018
1 parent e28ebaf commit 62effe1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2791,6 +2791,7 @@ namespace Sass {
>(p)
) {
bool could_be_property = peek< sequence< exactly<'-'>, exactly<'-'> > >(p) != 0;
bool could_be_escaped = false;
while (p < q) {
// did we have interpolations?
if (*p == '#' && *(p+1) == '{') {
Expand All @@ -2799,9 +2800,10 @@ namespace Sass {
}
// A property that's ambiguous with a nested selector is interpreted as a
// custom property.
if (*p == ':') {
if (*p == ':' && !could_be_escaped) {
rv.is_custom_property = could_be_property || p+1 == q || peek< space >(p+1);
}
could_be_escaped = *p == '\\';
++ p;
}
// store anyway }
Expand Down

0 comments on commit 62effe1

Please sign in to comment.