From aae354c9513c8f36e770ff805e75585fb152593c Mon Sep 17 00:00:00 2001 From: adamdotdevin <2363879+adamdottv@users.noreply.github.com> Date: Tue, 12 Aug 2025 13:03:26 -0500 Subject: fix: word wrapping with hyphens --- packages/tui/internal/util/file.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'packages/tui/internal/util') diff --git a/packages/tui/internal/util/file.go b/packages/tui/internal/util/file.go index b079f24cd..943f784fc 100644 --- a/packages/tui/internal/util/file.go +++ b/packages/tui/internal/util/file.go @@ -85,6 +85,7 @@ func Extension(path string) string { func ToMarkdown(content string, width int, backgroundColor compat.AdaptiveColor) string { r := styles.GetMarkdownRenderer(width-6, backgroundColor) content = strings.ReplaceAll(content, RootPath+"/", "") + content = strings.ReplaceAll(content, "-", "\u2011") rendered, _ := r.Render(content) lines := strings.Split(rendered, "\n") @@ -105,5 +106,6 @@ func ToMarkdown(content string, width int, backgroundColor compat.AdaptiveColor) } } content = strings.Join(lines, "\n") + content = strings.ReplaceAll(content, "\u2011", "-") return strings.TrimSuffix(content, "\n") } -- cgit v1.2.3