wpillar / atom-trailing-spaces

An Atom package to highlight trailing whitespace.
MIT License
16 stars 7 forks source link

Line breaks in Clojure marked as invalid trailing whitespace #21

Open iconara opened 8 years ago

iconara commented 8 years ago

I reported this in atom/language-clojure#51, but it might belong here, I'm not sure. It seems that trailing whitespace highlighting has been broken in Clojure since at least v0.3.1 of atom-trailing-spaces.

Line breaks inside of Clojure forms get highlighted when they shouldn't. It looks like this:

09c1fb18-7988-11e6-967f-2c686ac02e51

When there is actual trailing whitespace it works as expected (on the second to last line the line break is not highlighted because there are two trailing spaces):

f9fb4452-7999-11e6-8143-017a168e3caf

I tried installing v0.3.1, which also exhibited this behaviour, and then I tried v0.3.0, which seems to highlight no trailing whitespace at all (probably because of the changes in Atom referenced in b70980e5c9107c8199b408ff58a27cb8925a077a).

Ruby and Java and other languages I've used seem to work fine, it's just Clojure I've had problems with.

iconara commented 8 years ago

As a workaround I've thrown this in my stylesheet:

atom-text-editor:not(.mini)::shadow {
  .source.clojure {
    .invalid.trailing-whitespace {
      background-color: transparent;
    }
  }
}