Glavin001 / atom-beautify

:mega: Help Wanted - Looking for Maintainer: https://github.com/Glavin001/atom-beautify/issues/2572 | :lipstick: Universal beautification package for Atom editor (:warning: Currently migrating to https://github.com/Unibeautify/ and have very limited bandwidth for Atom-Beautify Issues. Thank you for your patience and understanding :heart: )
http://unibeautify.com/
MIT License
1.5k stars 453 forks source link

beautify HTML does not align comments #490

Closed GradyD closed 9 years ago

GradyD commented 9 years ago

When on an HTML file it does beautify comments. It appears it tries to but when the comment spans multiple lines it does not end up properly indented.

prettydiff commented 9 years ago

Most beautifiers will not attempt to beautify the internals of comment, because a comment can contain anything. Attempting to parse the internals of the comment can produce parse errors unnecessarily. Accounting for these potential parser errors is a lot of work that produces extremely limited benefits.

prettydiff commented 9 years ago

What if a comment were lightly minified so that it is pushed onto a single line of code? This way it will no longer be a challenge to read the code, but there is the risk that you have permanently lost extraneous white space that you might need in some rare edge cases.

GradyD commented 9 years ago

I'm not so much asking for the comment to be minified. I would rather see the comment block be roughly the same indent as the code around it. Or if it's possible leave the comment block at the current spacing instead of moving it?

prettydiff commented 9 years ago

Would you mind creating a gist with an example? Perhaps a before and after? I believe I understand what you mean exactly, but I want to be sure we are speaking to the same things.

GradyD commented 9 years ago

For some reason I am not able to duplicate it anymore. Maybe it was just a blip in one of the releases.