fix: invisible html tags and compact long delay (#304)

This commit is contained in:
phantomreactor 2025-06-22 16:59:04 +05:30 committed by GitHub
parent dc1947838c
commit 28bc49ad17
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 60 additions and 25 deletions

View file

@ -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")
}