Skip to content

Commit

Permalink
Fix parsing of quoted string in interpolates
Browse files Browse the repository at this point in the history
  • Loading branch information
mgreter committed Dec 27, 2014
1 parent 7021663 commit d349d81
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ namespace Sass {
p.source = t.begin;
p.position = p.source;
p.end = t.end;
p.dequote = true;
return p;
}

Expand Down Expand Up @@ -1209,7 +1210,7 @@ namespace Sass {
// see if there any interpolants
const char* p = find_first_in_interval< sequence< negate< exactly<'\\'> >, exactly<hash_lbrace> > >(chunk.begin, chunk.end);
if (!p) {
String_Constant* str_node = new (ctx.mem) String_Constant(path, source_position, chunk);
String_Constant* str_node = new (ctx.mem) String_Constant(path, source_position, chunk, dequote);
str_node->is_delayed(true);
return str_node;
}
Expand Down
3 changes: 2 additions & 1 deletion parser.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,12 @@ namespace Sass {


Token lexed;
bool dequote;

Parser(Context& ctx, string path, Position source_position)
: ctx(ctx), stack(vector<Syntactic_Context>()),
source(0), position(0), end(0), path(path), column(1), source_position(source_position)
{ stack.push_back(nothing); }
{ dequote = false; stack.push_back(nothing); }

static Parser from_string(string src, Context& ctx, string path = "", Position source_position = Position());
static Parser from_c_str(const char* src, Context& ctx, string path = "", Position source_position = Position());
Expand Down

0 comments on commit d349d81

Please sign in to comment.