Skip to content

Commit

Permalink
Fix inspect for quoted strings
Browse files Browse the repository at this point in the history
  • Loading branch information
glebm committed Apr 15, 2019
1 parent 34ba25e commit e53c7f8
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/fn_miscs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e53c7f8

Please sign in to comment.