mutian / Sublime-CSS-Format

CSS Formatting for Sublime Text
http://mutian.github.io/Sublime-CSS-Format/
MIT License
98 stars 27 forks source link

wrong formatting of less comments #30

Open thecotne opened 9 years ago

thecotne commented 9 years ago

when i format this

// body {
//  clear: both;
// }

i got this (note: it has syntax error)

// body {
    //  clear: both;
    //
}

expected result

// body {
//  clear: both;
// }
scotty6435 commented 9 years ago

Additionally, wrapping a complete CSS rule in comments will increase the indent of the property each time the file is saved!

/*li:before {
    display: none;
}*/

Becomes...

/*li:before {
        display: none;
}*/
thecotne commented 9 years ago

@scotty6435 that's different issue

scotty6435 commented 9 years ago

@thecotne I see, didn't spot the missing comment. It does still indicate there is a comment parsing problem.

leptest commented 9 years ago

Getting the same issues as @thecotne and @scotty6435

Original image

First save image

Second save image

Expected result: no changes.