cdepillabout/pretty-simple

remove whitespace on ends of lines

cdepillabout opened this issue · 3 comments

When trying to pretty-print a datatype like the following:

[#<Foobar id: 1, user_id: 1, name: "sample.pdf", created_at: "2020-09-11 05:12:11", recognized_at: "2020-09-11 05:13:26">]

I get an output like the following:

[ #<Foobar id: 1
, user_id: 1
, name: "sample.pdf"■
, created_at: "2020-09-11 05:12:11"■
, recognized_at: "2020-09-11 05:13:26" >
] 

Here, the "■" character represents a line-ending space.

It appears that spaces come after a string (like "sample.pdf"), but not after a number (like 1).


The reason it would be nice to fix this is because sometimes I use the pretty-simple executable to format stuff in my editor, but I have my editor setup to highlight lines ending with a space (in order to not have any trailing space characters that I don't intend).

Are you using HEAD, or the last release? It looks like this is already fixed.

Oops, I didn't realize I wasn't running HEAD! Sorry for the noise :-)

No worries - all the more reason for #83!