Description
Content with Windows line endings leaves a raw \r inside the box line. Width math stays consistent (\r measures 0), but on a terminal the carriage return jumps to column 0 and the right border overwrites the left edge.
Reproduction
out, _ := box.NewBox().Render("", "line one\r\nline two")
// out contains "│line one\r│"
Expected: \r\n normalized to \n before splitting — the approach lipgloss takes in Style.Render ("carriage returns can cause strange behaviour when rendering"); go-pretty similarly normalizes via text.ProcessCRLF.
Fix prepared locally; will land referencing this issue.
Description
Content with Windows line endings leaves a raw
\rinside the box line. Width math stays consistent (\rmeasures 0), but on a terminal the carriage return jumps to column 0 and the right border overwrites the left edge.Reproduction
Expected:
\r\nnormalized to\nbefore splitting — the approach lipgloss takes inStyle.Render("carriage returns can cause strange behaviour when rendering"); go-pretty similarly normalizes viatext.ProcessCRLF.Fix prepared locally; will land referencing this issue.