Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preserve whitespace by default? #37

Open
rauchg opened this issue Feb 13, 2016 · 6 comments
Open

Preserve whitespace by default? #37

rauchg opened this issue Feb 13, 2016 · 6 comments

Comments

@rauchg
Copy link

rauchg commented Feb 13, 2016

https://github.com/timoxley/columnify/blob/master/index.js#L89

Why does it collapse whitespace other than newlines?

@rauchg
Copy link
Author

rauchg commented Feb 13, 2016

Once I got rid of that option in my local copy, I also traced whitespace trimming to:
https://github.com/timoxley/columnify/blob/master/utils.js#L83

@timoxley
Copy link
Owner

Why does it collapse whitespace other than newlines?

Does it by default because it's trying to format dirty data as prettily as possible, Though I think I have been bitten by this before, trying to display some data that was pre-formatted.

Can you elaborate on your use-case?

@rauchg
Copy link
Author

rauchg commented Feb 13, 2016

@timoxley displaying pre-formatted data, where leading whitespace is relevant

@brandoncarl
Copy link

This would be great to allow a preserveWhitespace option!

@nikolakanacki
Copy link

Agreed, whitespace is a must for pre-formatted tables.

@runvnc
Copy link

runvnc commented Jul 4, 2016

If no one is working on this, I can try to do a preserveWhitespace option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants