-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable/Skip HTML single-line comment #426
Comments
Maybe something like
|
+1 to this |
+1! |
I like the ignore_pattern suggestion; to allow for multiple patterns, perhaps it would be better to change it to the following: |
We're not going to do a regex array (sorry folks, that's just crazy town frolics), but having single line html comments not get moved to a new line sounds totally reasonable. |
+1. Sooner the better! :) much appreciated. |
+1. My pragmatic use-case is the freaking html inline block spacing behavior. Basically in order to remove auto white-space between inline elements you need their tags to be together, which I normally accomplished via comments. The other workaround which has been driving me nuts was to set font size to zero. Now instead of inheriting a reasonable font-size, I inherit the font-size of zero and often forget about it days later causing me to say "hey, why isn't that element showing up?" |
For those interested, I couldn't handle the "font-size: 0" hack anymore so I customized my beautify-html to the following:
The simple test I created was:
The above is not tested very well, and I don't have time to spend making it suitable for an official PR. I will update the code here if I find any bugs. Edit: |
Hi any news on if this option will be added? Would be great. Thanks. |
+1 yes please. Love Beautify but hate having my ending div comments on a new line. |
Was this resolved? I am interested in this. |
@mazadah Having single-line comments (comments whose contents do not include a newline) stay on the same line would also be reasonable. It might also be reasonable to have the rule be that a closing tag followed by a comment, followed by a newline should not be moved. |
This is fixed in 1.8.0 as #1337 |
I usually have a comment after the closing html tag in order to identify the tag on big files with a lot of tags.
Input:
Current output:
Desired output:
It would be nice if it would be able skip those single-line comments.
The text was updated successfully, but these errors were encountered: