BeautifyRuby
BeautifyRuby copied to clipboard
Add option to prevent deletion of empty lines
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!
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.
I am getting an extra line at the end of the file now. Can you confirm this to be true for you?
Works fine (line at the end not removed).
But the ticket was originally for an option to keep empty lines in the code - and this is not implemented?
+1 on this feature -- especially in .html.erb files. Thanks for the great work everyone. :)
+1 for sure
Also, for some reason, the line at the end DOES get removed for me. Anybody here still has the issue?
+1 Also have the issue with the end line DOES get removed. Thanks as well!
+1 any news?
+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?
I solved this in my fork with this patch: https://github.com/andmej/BeautifyRuby/commit/b5d042ea15d97c5907388d03173977d4f493aac0
@andmej why not pull request your feature? :+1: :)