sast icon indicating copy to clipboard operation
sast copied to clipboard

Sass Interpolations are not correctly stringified

Open ManuelSch opened this issue 5 years ago • 1 comments

Sass interpolations (https://sass-lang.com/documentation/interpolation) are parsed correctly, but stringify() removes them, resulting in incorrect code.

Steps to reproduce:

const tree = sast.parse('width: calc(100% - #{2 * $spacer})', { syntax: 'sass' });
console.log(sast.stringify(tree));

// should output: width: calc(100% - #{2 * $spacer})
// current output: width: calc(100% - 2 * $spacer)

This happens for both sass and scss.

ManuelSch avatar Dec 02 '19 18:12 ManuelSch

Thanks for the report!

shawnbot avatar Jan 29 '20 01:01 shawnbot