-
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
Add an option to strip empty lines #307
Comments
Excellent report, thank you. Have you tried using the option |
👍 @keeganstreet's point. Most changes in 1.4.0 were great, but it would be nice to have any option to strip all blank lines. IMO, it would make the most sense for |
Yeah, I see your point. Until we get to fixing this, have you tried |
Hi, can you add same option for css? |
Please add the same functionality to css :-) |
@Migacz85 Have you tried this? I think it is already there. You'll also need to set |
docs (https://www.npmjs.com/package/js-beautify#css--html):
so, setting |
It would be useful if JS Beautify had an option to strip empty lines.
Includes, partials and other serverside code can create blank lines in the HTML. The HTML would be more beautiful without these blank lines.
This used to be the behaviour in version 1.3.1 but I think it was changed for #285.
Input:
(Note: the line after P1 should contain some spaces and tabs but GitHub Flavored Markdown is removing them. This line should still be removed by JS Beautify.)
Configuration:
js-beautify input.html -o output.html --remove-empty-lines
Expected output:
Actual output:
The text was updated successfully, but these errors were encountered: