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

Comments lost after formatting #77

Open cslee opened 3 years ago

cslee commented 3 years ago

Comments with // before other comments in /* ... */ are lost after formatting

Before:

// line1
// line2
/* blah blah blah */
.class1
  margin 8px

After:

/* blah blah blah */
.class1 {
  margin: 8px;
}

Comments with // at the end of the file are also lost

Before:

.class1
  margin 8px

// line1
// line2

After:

.class1 {
  margin: 8px;
}
Wolff-H commented 3 years ago

Same. My temporary solution is to put an empty identifier at the bottom end, like

.
    // 

If anyone has a better solution please share :)

KnifeFed commented 2 years ago

Ping?

cj1128 commented 2 years ago

+1, this is really troubling, any updates?

stefan-koenig-marmalade commented 2 weeks ago

+1, please make this selectable in the settings While testing different styling options, it's very annoying if commented lines are removed automatically on file save.