Skip to content

Commit

Permalink
Fix unquote handling for non string types
Browse files Browse the repository at this point in the history
Feature is deprecated in ruby sass. We may
should print a warning to inform the user.

Fixes sass#1258
  • Loading branch information
mgreter committed Jun 15, 2015
1 parent eb1d90a commit 83a1f1c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -803,14 +803,17 @@ namespace Sass {
if (dynamic_cast<Null*>(arg)) {
return new (ctx.mem) Null(pstate);
}
else if (List* list = dynamic_cast<List*>(arg)) {
return list;
}
else if (String_Quoted* string_quoted = dynamic_cast<String_Quoted*>(arg)) {
String_Constant* result = new (ctx.mem) String_Constant(pstate, string_quoted->value());
// remember if the string was quoted (color tokens)
result->sass_fix_1291(string_quoted->quote_mark() != 0);
return result;
}
To_String to_string(&ctx);
return new (ctx.mem) String_Constant(pstate, unquote(string(arg->perform(&to_string))));
return new (ctx.mem) String_Constant(pstate, string(arg->perform(&to_string)));
}

Signature quote_sig = "quote($string)";
Expand Down

0 comments on commit 83a1f1c

Please sign in to comment.