Skip to content
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 option to prevent deletion of empty lines #49

Open
h0jeZvgoxFepBQ2C opened this issue Jul 24, 2013 · 11 comments
Open

Add option to prevent deletion of empty lines #49

h0jeZvgoxFepBQ2C opened this issue Jul 24, 2013 · 11 comments

Comments

@h0jeZvgoxFepBQ2C
Copy link

I would like to prevent the deleting of empty lines, especially in erb files its sometimes more comfortable to read parts if there are empty lines.

at the moment all empty lines are removed..

Could you maybe add an option?

thanks!

@phoet
Copy link

phoet commented Nov 5, 2013

the beautifyer also deletes newlines at the end of a ruby file. git does not like that very much.

maybe @CraigWilliams can point me to some place in the code where i can add configurations to handle that.

@CraigWilliams
Copy link
Owner

I am getting an extra line at the end of the file now. Can you confirm this to be true for you?

@h0jeZvgoxFepBQ2C
Copy link
Author

Works fine (line at the end not removed).

@h0jeZvgoxFepBQ2C
Copy link
Author

But the ticket was originally for an option to keep empty lines in the code - and this is not implemented?

@CraigWilliams CraigWilliams reopened this Dec 7, 2013
@kemallette
Copy link

+1 on this feature -- especially in .html.erb files. Thanks for the great work everyone. :)

@petrpacas
Copy link

+1 for sure

Also, for some reason, the line at the end DOES get removed for me. Anybody here still has the issue?

@mtomov
Copy link

mtomov commented Mar 17, 2017

+1 Also have the issue with the end line DOES get removed. Thanks as well!

@NaldoColella
Copy link

+1 any news?

@mejibyte
Copy link

+1. It looks like htmlbeautifier already supports this so it's just a matter of piping it in: https://github.com/threedaymonk/htmlbeautifier/blob/4f4fa8c293f42e5475370d3bd8595eec2f4171d0/lib/htmlbeautifier.rb#L18

Are pull requests for this welcome?

@mejibyte
Copy link

I solved this in my fork with this patch: mejibyte@b5d042e

@benkoshy
Copy link
Contributor

@andmej why not pull request your feature? 👍 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants