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 30, 2015
1 parent 4794134 commit f43b881
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 @@ -771,14 +771,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

1 comment on commit f43b881

@xzyfer
Copy link

@xzyfer xzyfer commented on f43b881 Jul 8, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this commit can be backed out. A better was my made in this PR and extracted into sass#1312.

Please sign in to comment.