Skip to content

Commit e53c7f8

Browse files
committed
Fix inspect for quoted strings
Tests: sass/sass-spec#1381 Fixes #2826
1 parent 34ba25e commit e53c7f8

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/fn_miscs.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,11 +186,16 @@ namespace Sass {
186186
{
187187
Expression* v = ARG("$value", Expression);
188188
if (v->concrete_type() == Expression::NULL_VAL) {
189-
return SASS_MEMORY_NEW(String_Quoted, pstate, "null");
189+
return SASS_MEMORY_NEW(String_Constant, pstate, "null");
190190
} else if (v->concrete_type() == Expression::BOOLEAN && v->is_false()) {
191-
return SASS_MEMORY_NEW(String_Quoted, pstate, "false");
191+
return SASS_MEMORY_NEW(String_Constant, pstate, "false");
192192
} else if (v->concrete_type() == Expression::STRING) {
193-
return Cast<String>(v);
193+
String_Constant *s = Cast<String_Constant>(v);
194+
if (s->quote_mark()) {
195+
return SASS_MEMORY_NEW(String_Constant, pstate, quote(s->value(), s->quote_mark()));
196+
} else {
197+
return s;
198+
}
194199
} else {
195200
// ToDo: fix to_sass for nested parentheses
196201
Sass_Output_Style old_style;

0 commit comments

Comments
 (0)