ThisIsManta / stylus-supremacy

A Node.js script that helps formatting Stylus files.
https://thisismanta.github.io/stylus-supremacy
MIT License
88 stars 9 forks source link

preserveNewLinesBetweenPropertyValues option seems ignored by vscode extension #109

Open fabien-michel opened 8 months ago

fabien-michel commented 8 months ago

Reproduce: Have VS code with thisismanta.stylus-supremacy extension installed (v2.17.6)

Create two files in an empty folder: ./.vscode/settings.json

{
    "stylusSupremacy.preserveNewLinesBetweenPropertyValues": true
}

./test.stylus

.blop
    background: linear-gradient(to right, blue, red), 
                blue

Try to format the stylus file using the extension, you get:

.blop {
    background: linear-gradient(to right, blue, red), blue;
}

which is not expected, because of preserveNewLinesBetweenPropertyValues set to true.

It works as expected from command line :

$ stylus-supremacy --version
v2.17.5
$ stylus-supremacy format test.stylus --options .vscode/settings.json

Results:

.blop {
    background:
        linear-gradient(to right, blue, red),
        blue;
}