Skip to content

Commit 0a57e9d

Browse files
committed
Merge pull request #1311 from xzyfer/fix/1279
Handle quoted string in case conversion functions
2 parents cbd82bf + 0e47772 commit 0a57e9d

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

functions.cpp

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -969,9 +969,12 @@ namespace Sass {
969969
}
970970

971971
if (String_Quoted* ss = dynamic_cast<String_Quoted*>(s)) {
972-
str = ss->quote_mark() ? quote(str) : str;
972+
String_Quoted* cpy = new (ctx.mem) String_Quoted(*ss);
973+
cpy->value(str);
974+
return cpy;
975+
} else {
976+
return new (ctx.mem) String_Constant(pstate, str);
973977
}
974-
return new (ctx.mem) String_Constant(pstate, str);
975978
}
976979

977980
Signature to_lower_case_sig = "to-lower-case($string)";
@@ -987,9 +990,12 @@ namespace Sass {
987990
}
988991

989992
if (String_Quoted* ss = dynamic_cast<String_Quoted*>(s)) {
990-
str = ss->quote_mark() ? quote(str, '"') : str;
993+
String_Quoted* cpy = new (ctx.mem) String_Quoted(*ss);
994+
cpy->value(str);
995+
return cpy;
996+
} else {
997+
return new (ctx.mem) String_Constant(pstate, str);
991998
}
992-
return new (ctx.mem) String_Constant(pstate, str);
993999
}
9941000

9951001
///////////////////

0 commit comments

Comments
 (0)