Skip to content

Commit 922704c

Browse files
delapuentexzyfer
authored andcommitted
Copying the delimiter property also.
Functions operating on a copy of lists must copy the delimiter also.
1 parent 0d5277c commit 922704c

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/eval.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,8 @@ namespace Sass {
461461
l->pstate(),
462462
l->length(),
463463
l->separator(),
464-
l->is_arglist());
464+
l->is_arglist(),
465+
l->delimiter());
465466
for (size_t i = 0, L = l->length(); i < L; ++i) {
466467
ll->append((*l)[i]->perform(this));
467468
}

src/functions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1304,7 +1304,7 @@ namespace Sass {
13041304
if (l->empty()) error("argument `$list` of `" + std::string(sig) + "` must not be empty", pstate);
13051305
double index = std::floor(n->value() < 0 ? l->length() + n->value() : n->value() - 1);
13061306
if (index < 0 || index > l->length() - 1) error("index out of bounds for `" + std::string(sig) + "`", pstate);
1307-
List_Ptr result = SASS_MEMORY_NEW(List, pstate, l->length(), l->separator());
1307+
List_Ptr result = SASS_MEMORY_NEW(List, pstate, l->length(), l->separator(), false, l->delimiter());
13081308
for (size_t i = 0, L = l->length(); i < L; ++i) {
13091309
result->append(((i == index) ? v : (*l)[i]));
13101310
}

0 commit comments

Comments
 (0)