Skip to content
Permalink
Browse files

Fix `inspect` for quoted strings

  • Loading branch information...
glebm committed Apr 13, 2019
1 parent 34ba25e commit e53c7f83708e8aa1db2deffc4bb2190516b07deb
Showing with 8 additions and 3 deletions.
  1. +8 −3 src/fn_miscs.cpp
@@ -186,11 +186,16 @@ namespace Sass {
{
Expression* v = ARG("$value", Expression);
if (v->concrete_type() == Expression::NULL_VAL) {
return SASS_MEMORY_NEW(String_Quoted, pstate, "null");
return SASS_MEMORY_NEW(String_Constant, pstate, "null");
} else if (v->concrete_type() == Expression::BOOLEAN && v->is_false()) {
return SASS_MEMORY_NEW(String_Quoted, pstate, "false");
return SASS_MEMORY_NEW(String_Constant, pstate, "false");
} else if (v->concrete_type() == Expression::STRING) {
return Cast<String>(v);
String_Constant *s = Cast<String_Constant>(v);
if (s->quote_mark()) {
return SASS_MEMORY_NEW(String_Constant, pstate, quote(s->value(), s->quote_mark()));
} else {
return s;
}
} else {
// ToDo: fix to_sass for nested parentheses
Sass_Output_Style old_style;

0 comments on commit e53c7f8

Please sign in to comment.
You can’t perform that action at this time.