mirror of
https://github.com/sst/opencode.git
synced 2025-08-04 13:30:52 +00:00
fix: invisible html tags and compact long delay (#304)
This commit is contained in:
parent
dc1947838c
commit
28bc49ad17
3 changed files with 60 additions and 25 deletions
|
@ -25,6 +25,8 @@ import (
|
|||
func toMarkdown(content string, width int, backgroundColor compat.AdaptiveColor) string {
|
||||
r := styles.GetMarkdownRenderer(width, backgroundColor)
|
||||
content = strings.ReplaceAll(content, app.RootPath+"/", "")
|
||||
content = strings.ReplaceAll(content, "<", "\\<")
|
||||
content = strings.ReplaceAll(content, ">", "\\>")
|
||||
rendered, _ := r.Render(content)
|
||||
lines := strings.Split(rendered, "\n")
|
||||
|
||||
|
@ -44,7 +46,6 @@ func toMarkdown(content string, width int, backgroundColor compat.AdaptiveColor)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
content = strings.Join(lines, "\n")
|
||||
return strings.TrimSuffix(content, "\n")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue