-
Notifications
You must be signed in to change notification settings - Fork 41
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
Switch to wrap-ansi module #6
Comments
Cool, happy to make the switch. |
It seems the tests are now failing, so there must be some differences between the 2 libraries. I don't have enough experience with wordwrap, wrap-ansi or this module to dive in. Going to cc @sindresorhus here. |
@sindresorhus @phated had the time to sit down and look at this request, the problem I'm running into is that we'd need for wrap-ansi to have support for hard wrapping: https://github.com/substack/node-wordwrap#wraphardstart-stop complex multi-column layout starts to look crazy if wrapping isn't enforced at a boundary. |
I've opened an issue about adding a hardwrap option: chalk/wrap-ansi#2 I probably won't have time to look into this right now, though. Maybe @Qix- @dthree does. |
@bcoe afik Can you post a test string with multiple columns that reproduces the unexpected behavior? |
see: chalk/wrap-ansi#3 |
@bcoe thanks for digging into this. Much appreciated. |
Warning: shameless self-plug! @phated If you're also interested in styling the output defined by 😺 |
@phated @nexdrew I've got a pull ready to go on yargs that adds ansi color support to the UI using wrap-ansi. Could you give this branch a shot with wrap-ansi and yargonaut, and see if it does the trick for you? |
We are using
yargs
in gulp-cli and use chalk to color the descriptions. I noticed that things start to get messed up due to the wordwrap module that is utilized. I switched it out in my local install for wrap-ansi (by the chalk team) and it fixed the problem.The text was updated successfully, but these errors were encountered: