Skip to content
This repository has been archived by the owner on Oct 21, 2022. It is now read-only.

Inline display of multiple leading/trailing spaces are collapsed to a single one #16

Open
pumbers opened this issue Apr 6, 2014 · 3 comments
Labels

Comments

@pumbers
Copy link

pumbers commented Apr 6, 2014

Recently came across an issue trying to right-pad a string using the clojure.core/format function and evaluating results inline.

Evaluating (format "%-9s" "12345") displays as "12345 " (6 characters) and appears to be padded with only 1 character, but (count (format "'%-9s'" "12345")) returns 9 which is the correct padded length. CLI REPL displays "12345 " and a count of 9 characters, which is correct.

More detail in the google groups discussion here: https://groups.google.com/forum/#!topic/clojure/5njSatbtc2c

@pumbers
Copy link
Author

pumbers commented Apr 14, 2014

Further info: I'm using LightTable 0.6.5, binary 0.8.4, Clojure 1.6.0 and Java 1.7.0_51 under Ubuntu 13.04. Attached is a screenshot of the inline output.

screenshot from 2014-04-07 13 43 59

@cldwalker
Copy link
Member

I've experienced this white space munging in inline results as well. For example: (identity " ") (3 spaces) appears as " " (1 space).

@cldwalker cldwalker added the bug label Oct 22, 2014
@joshuafcole
Copy link
Contributor

There may be a quick fix here by putting the inline results into a


tag instead of a
, but I'd have to dig deeper to be sure,

On Wed, Oct 22, 2014 at 12:21 PM, Gabriel Horner [email protected]
wrote:

I've experienced this white space munging in inline results as well. For
example: (identity " ") (3 spaces) appears as " " (1 space).


Reply to this email directly or view it on GitHub
#16 (comment).

Screw the environment. Please print this email immediately. And then burn
it.

@cldwalker cldwalker changed the title Inline display of some string contents appears incorrect Inline display of multiple leading/trailing spaces are collapsed to a single one Mar 11, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants