Skip to content

Commit 33a9107

Browse files
committed
Implement correct output for empty strings
Fixes #988
1 parent f0475ee commit 33a9107

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

functions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -940,7 +940,7 @@ namespace Sass {
940940
error(msg, pstate, backtrace);
941941
}
942942
catch (...) { throw; }
943-
return new (ctx.mem) String_Constant(pstate, newstr);
943+
return new (ctx.mem) String_Quoted(pstate, newstr);
944944
}
945945

946946
Signature to_upper_case_sig = "to-upper-case($string)";

output.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ namespace Sass {
134134
String_Constant* valConst = static_cast<String_Constant*>(dec->value());
135135
string val(valConst->value());
136136
if (dynamic_cast<String_Quoted*>(valConst)) {
137-
if (val.empty()) {
137+
if (!valConst->quote_mark() && val.empty()) {
138138
bPrintExpression = false;
139139
}
140140
}

0 commit comments

Comments
 (0)