From c23b76a567d26d6ed21d843648d1410314579595 Mon Sep 17 00:00:00 2001 From: Marcel Greter Date: Sat, 13 Jun 2015 17:54:45 +0200 Subject: [PATCH] Fix parsing edge case with numbers and trailing escapes Fixes https://github.com/sass/libsass/issues/1219 --- parser.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/parser.cpp b/parser.cpp index 59ba192be8..965495c8fb 100644 --- a/parser.cpp +++ b/parser.cpp @@ -1381,8 +1381,7 @@ namespace Sass { if (lex< important >()) { return new (ctx.mem) String_Constant(pstate, "!important"); } - const char* stop; - if ((stop = peek< value_schema >())) + if (const char* stop = peek< value_schema >()) { return parse_value_schema(stop); } if (lex< kwd_true >()) @@ -1412,6 +1411,9 @@ namespace Sass { if (lex< sequence< dimension, optional< sequence< exactly<'-'>, negate< digit > > > > >()) { return new (ctx.mem) Textual(pstate, Textual::DIMENSION, lexed); } + if (lex< sequence< static_component, one_plus< identifier > > >()) + { return new (ctx.mem) String_Constant(pstate, lexed); } + if (lex< number >()) { return new (ctx.mem) Textual(pstate, Textual::NUMBER, lexed); }