fix(tui): markdown wrapping off sometimes

This commit is contained in:
adamdottv 2025-07-04 11:16:38 -05:00
parent f6108b7be8
commit 32d5db4f0a
No known key found for this signature in database
GPG key ID: 9CB48779AF150E75

View file

@ -83,7 +83,7 @@ func Extension(path string) string {
}
func ToMarkdown(content string, width int, backgroundColor compat.AdaptiveColor) string {
r := styles.GetMarkdownRenderer(width-7, backgroundColor)
r := styles.GetMarkdownRenderer(width-6, backgroundColor)
content = strings.ReplaceAll(content, RootPath+"/", "")
rendered, _ := r.Render(content)
lines := strings.Split(rendered, "\n")