This repository was archived by the owner on Oct 24, 2025. It is now read-only.

Description
input.scss
$foo: "'abcd'"; // '"abcd"' also doesn't work
@error str-slice( $foo, 1, 2 ); // not real code, @error is just used to get raw value of $foo
Actual results
libsass 3.5.4
ab on line 3 at column 1
Expected result
'a on line 3 at column 1
ruby sass 3.5.6
'a on line 3 at column 1
version info:
$ node-sass --version
node-sass 4.10.0 (Wrapper) [JavaScript]
libsass 3.5.4 (Sass Compiler) [C/C++]
Further context
We have a string-utility function in our code base, which slices bigger strings in smaller pieces using str-slice. It works fine, except when the piece that should be sliced out of a bigger string coincidentally starts with quotes and ends with the same quotes, then str-slice returns the sliced string without the quotes, which makes our function return incorrect stuff.