vlaaad / reveal

Read Eval Visualize Loop for Clojure
https://vlaaad.github.io/reveal/
MIT License
597 stars 21 forks source link

Definitions from files with CRLF echo \r to Reveal #25

Closed rbeesley closed 3 years ago

rbeesley commented 3 years ago

For example on Windows:

(def example-def-with-CRLF
  {:hello "world"
   "foo" :bar})

Will output:

(def example-def-with-CRLF\r
  {:hello "world"\r
   "foo" :bar})
=> #'user/example-def-with-CRLF

nRepl just shows:

#'user/example-def-with-CRLF
clj꞉user꞉>

So Reveal is perhaps a better response in that it shows something, but for Windows, the carriage return wouldn't be expected in this case. Perhaps Reveal needs a line ending setting with an environment default if it isn't overwritten? I could see this being the desired statement because it is what is being sent, but it also doesn't seem right.

vlaaad commented 3 years ago

Thanks for report! There is a TODO in code about this issue: https://github.com/vlaaad/reveal/blob/master/src/vlaaad/reveal/stream.clj#L152

I agree it makes sense to hide those \rs. Contributions welcome!

vlaaad commented 3 years ago

Fixed in 1.3.194

rbeesley commented 3 years ago

I agree it makes sense to hide those \rs. Contributions welcome!

Thanks for doing this... I'm still working through CftBaT, so I'm probably not ready to make contributions yet... but I'm getting better.

vlaaad commented 3 years ago

Cheers!