fix: word wrapping with hyphens

This commit is contained in:
adamdotdevin
2025-08-12 13:03:26 -05:00
parent 4cddda3e16
commit aae354c951
2 changed files with 5 additions and 1 deletions

View File

@@ -325,7 +325,9 @@ func renderText(
// wrap styled text
styledText := result.String()
wrappedText := ansi.WordwrapWc(styledText, width-6, " -")
styledText = strings.ReplaceAll(styledText, "-", "\u2011")
wrappedText := ansi.WordwrapWc(styledText, width-6, " ")
wrappedText = strings.ReplaceAll(wrappedText, "\u2011", "-")
content = base.Width(width - 6).Render(wrappedText)
}