Skip to content

Commit

Permalink
Merge pull request #2864 from mgreter/bugfix/issue-2863
Browse files Browse the repository at this point in the history
Remove unquoting for str_slice, str-insert and str-index
  • Loading branch information
mgreter committed Apr 12, 2019
2 parents 68d3528 + 55685f5 commit 9e937b4
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/fn_strings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,8 @@ namespace Sass {
try {
String_Constant* s = ARG("$string", String_Constant);
str = s->value();
str = unquote(str);
String_Constant* i = ARG("$insert", String_Constant);
std::string ins = i->value();
ins = unquote(ins);
double index = ARGVAL("$index");
size_t len = UTF_8::code_point_count(str, 0, str.size());

Expand Down Expand Up @@ -148,9 +146,7 @@ namespace Sass {
String_Constant* s = ARG("$string", String_Constant);
String_Constant* t = ARG("$substring", String_Constant);
std::string str = s->value();
str = unquote(str);
std::string substr = t->value();
substr = unquote(substr);

size_t c_index = str.find(substr);
if(c_index == std::string::npos) {
Expand All @@ -175,7 +171,7 @@ namespace Sass {
double end_at = ARGVAL("$end-at");
String_Quoted* ss = Cast<String_Quoted>(s);

std::string str = unquote(s->value());
std::string str(s->value());

size_t size = utf8::distance(str.begin(), str.end());

Expand Down

0 comments on commit 9e937b4

Please sign in to comment.