summaryrefslogtreecommitdiffhomepage
path: root/packages
diff options
context:
space:
mode:
authorYihui Khuu <[email protected]>2025-08-15 21:21:08 +1000
committerGitHub <[email protected]>2025-08-15 06:21:08 -0500
commitc35e1a03d1eb2db6febadd5205bec0aa785eb02a (patch)
treeecb409fd4153b8664356da01266715da3406d056 /packages
parent92d4366a20b4499b8e4817df442d67d021949feb (diff)
downloadopencode-c35e1a03d1eb2db6febadd5205bec0aa785eb02a.tar.gz
opencode-c35e1a03d1eb2db6febadd5205bec0aa785eb02a.zip
fix(tui): issue with rendering markdown tables (#1956)
Diffstat (limited to 'packages')
-rw-r--r--packages/tui/internal/util/file.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/tui/internal/util/file.go b/packages/tui/internal/util/file.go
index 879e8a6ab..050b96343 100644
--- a/packages/tui/internal/util/file.go
+++ b/packages/tui/internal/util/file.go
@@ -86,7 +86,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+"/", "")
- hyphenRegex := regexp.MustCompile(`-([^ ]|$)`)
+ hyphenRegex := regexp.MustCompile(`-([^ \-|]|$)`)
content = hyphenRegex.ReplaceAllString(content, "\u2011$1")
rendered, _ := r.Render(content)
lines := strings.Split(rendered, "\n")