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

Preserving spaces around variables #21

Open animify opened 6 years ago

animify commented 6 years ago

Would you consider adding an option for preserving spaces around variables or comments between variables?

image

Preserving whitespace around something like the above would be cool!

ThisIsManta commented 6 years ago

You mean a new line before a comment, don't you?

animify commented 6 years ago

Yeah before comments, but even just between variables, so that's easier to distinguish groups of variables. Like above, the new lines act as a divider between family/headings/size/weights etc.

ThisIsManta commented 6 years ago

I put this on-hold because I still can't find a good solution to parse single-line comments.

animify commented 6 years ago

Fair enough, how about an option for now that will preserve new lines around variables?

kbtz commented 5 years ago

I've been using this formatter for a while now and the only thing I see left to make it perfect is to not remove blank lines around grouped variable declarations such as hashes.

@ThisIsManta Thanks for you amazing work! :pray: