atom / language-clojure

Clojure package for Atom
Other
49 stars 48 forks source link

Line breaks marked as invalid trailing whitespace #51

Closed iconara closed 7 years ago

iconara commented 8 years ago

I'm not sure when this started happening, or if it's Atom's fault or this package's fault, but last time I edited Clojure in Atom (in mid August I think) it looked fine, but now (in mid September) every single line break is marked as invalid trailing whitespace.

I'm using language-clojure package in combination with trailing-spaces to show trailing whitespace, but as far as I can tell all that package does is highlight what other parts of Atom are marking as trailing whitespace, it only seems to contain styling and no logic to detect trailing whitespace.

trailing-whitespace

This is how the line breaks end up in the DOM:

screen shot 2016-09-13 at 08 01 14

This doesn't happen in any other language I'm regularly edit with Atom, that's why I'm reporting it here. Could it be something in the Clojure grammar that's marking line breaks as invalid whitespace?

It's UNIX line feeds, so it's not that it's Windows line endings or anything like that.

iconara commented 8 years ago

Oh, and if there is actual trailing whitespace it's correctly identified and the line break is not, as expected:

screen shot 2016-09-13 at 10 07 45

50Wliu commented 7 years ago

Hey there @iconara. I'm not familiar with Clojure, so please bear with me. Is trailing whitespace actually invalid (ie, the code will not compile/run), or is it simply considered "best practices" to not have trailing whitespace?

iconara commented 7 years ago

It's the same as most other languages, it's purely an aesthetic issue.

50Wliu commented 7 years ago

Ok, thanks.