-
Notifications
You must be signed in to change notification settings - Fork 10
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
Respect ANSI codes when applying maxWidth #57
Comments
Adding
I'm not sure it's worth it. I think I'd rather do one of the following:
I get that relying on other packages can be annoying, but I'm super sensitive about keeping the core sywac package as lean as possible. What do you think? |
Totally fair. I have been playing with lean Knowing nothing about it my leaning would be towards a basic version of option 1 - just enough that typical chalk/kleur styling doesn't break wrapping. Down the road if someone was itching to use a bunch of double wide emojis or w/e in their terminal, then option 2 or 3 could work. (Or, if |
I like the idea of a "wrap text" style hook. Maybe we should look into that possibility. |
This was discussed originally in #46 but I thought I'd break it into a separate (possibly solvable) issue.
That discussion reminded me of https://github.com/chalk/wrap-ansi, which might solve the problem outright if we are willing to add a (small but certainly not zero weight) dependency to sywac.
It's not highest priority but I think scratching this issue off the list makes it easier to push/promote the idea of user-created styles for sywac, since you wouldn't need to worry about strange splitting if you don't massage the maxWidth.
The text was updated successfully, but these errors were encountered: