2

Light Table appears to collapse multiple consecutive spaces.

Expected behavior: (str "hello   " "there") => "hello   there"
Actual behavior:   (str "hello   " "there") => "hello there"

enter image description here

Kenny Evitt
  • 9,291
  • 5
  • 65
  • 93
Atte Juvonen
  • 4,922
  • 7
  • 46
  • 89
  • I can't reproduce your result. – Sam Estep Jul 26 '16 at 23:15
  • @Sam Estep: your example has a single space in input. Use multiple spaces in input and you can reproduce the problem. – Atte Juvonen Jul 26 '16 at 23:18
  • I did have multiple spaces in the source for my comment, but the Markdown renderer on this site collapses whitespace, so I edited that part out. When I copy the text of the call to `str` from your question and paste it into `lein repl` or `boot repl`, I get the output you give as the "Expected behavior". – Sam Estep Jul 26 '16 at 23:23
  • Ok, this must be a bug in Light Table then. Added screenshot to OP. – Atte Juvonen Jul 26 '16 at 23:25
  • Yeah, I just tried it in Light Table and got the same result. Looks like someone has [already posted](https://groups.google.com/forum/#!topic/light-table-discussion/uaBG0oySCKo) on the Light Table Google Group. I edited your question to clarify that it's more about Light Table than Clojure. – Sam Estep Jul 26 '16 at 23:35
  • Yes, I posted it just now :D – Atte Juvonen Jul 26 '16 at 23:40
  • Oh! I assumed that was someone else because of the different username. Hopefully the behavior will be fixed. :) – Sam Estep Jul 26 '16 at 23:41
  • This isn't specific to Clojure. – Kenny Evitt Jul 27 '16 at 11:16
  • Please submit an issue for this on [GitHub](https://github.com/LightTable/LightTable/issues/new). – Kenny Evitt Jul 27 '16 at 11:19

1 Answers1

3

I assume this is "just" a display issue related to light table's HTML-based platform. You can confirm this by evaluating these expressions:

(= "hello     there" (str "hello     " "there")) ; true
(= "hello there"     (str "hello     " "there")) ; false 
amalloy
  • 89,153
  • 8
  • 140
  • 205