Closed alavers closed 8 years ago
I think that expression was needed because when you format a single block of code instead of the whole file, you end up with an extra line break. Do you mind trying?
Yes you're right, good call. Updated the PR to take that into account.
Sorry, I totally forgot about this
I noticed sublime esformatter was removing the trailing newline at the end files, in spite of the fact that I have
before.EndOfFile
set to 1 in my.esformatter
.I found the culprit in this plugin. The offending line of code predates the
EndOfFile
option which was introduced here: https://github.com/millermedeiros/esformatter/issues/111 so it seems the regex replacement may no longer be necessary.With this change sublime-esformatter will obey esformatter's decision on EOF newlines.
But if there was another good reason for removing trailing newlines, feel free to close this PR :)