Closed pachecot closed 1 month ago
Seems like issue is in x/ansi.Wrap isn't trimming the '\r'
from "\r\n"
and adding spaces so getting stuff like "\r \n"
.
Hey @pachecot I came across this problem as well recently. There's an open PR to strip \r
in the Render
function. That should hopefully fix this issue as well. I can add a test for this behaviour to that PR as well. Thanks a ton for including an example to reproduce this issue 🙏
I'm not sure if this fix should also be in other formatting functions as users will likely still encounter this if they're only using x/ansi
for wrapping and not lipgloss for styling... 🤔 Maybe @aymanbagabas has thoughts on this?
Added a test for this case in the linked PR :)
thanks @bashbunni looks like it would fix it.
hey @bashbunni @aymanbagabas, on closer look x/ansi seems fine.
found issue source and submitted PR, which may be redundant with #386
something in the resize logic seems to fail on a carriage return line feed "\r\n"
renders ok without setting the Width
this is the result I got
edit: