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

reformat document on windows puts in blank lines #156

Open
timrobinson33 opened this issue Nov 23, 2020 · 3 comments
Open

reformat document on windows puts in blank lines #156

timrobinson33 opened this issue Nov 23, 2020 · 3 comments

Comments

@timrobinson33
Copy link

using reformat document on windows puts in a blank line after every line. Also every time you run the reformat, it doubles the number of blank lines at the end.

e.g. if you start off with 2 lines 1 and 2, after reformatting once you will get [1, blank line, 2, blank line], then after reformatting again you will get [1, blank, 2, blank, blank], and after another reformat you will get [1, blank, 2, blank, blank, blank, blank]

@timrobinson33
Copy link
Author

Seems it only happens with files with windows line endings (CRLF). However, this is the default line ending for files created by lein new app so it's likely to trip up most new users on windows

@malcolm-s
Copy link

malcolm-s commented Jan 22, 2021

This happened for me too! Using the Clojure plugin v0.13.1.

It also added extra blank lines for commented out lines (starting with ;)

I tested directly installing the cljfmt version 0.7.0 as a plugin in Leiningen and running it on the same files and no extra lines were added, so I think it's definitely in this repo rather than the cljfmt one.

@eastrd
Copy link

eastrd commented Nov 15, 2021

I'm also encountering this issue in the newest version v0.13.1, I was wondering if there have been any updates on this?

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

3 participants