mirror of
https://github.com/abhinavxd/libredesk.git
synced 2026-09-10 22:25:39 +00:00
send links to the LLM as markdown so drafts keep real hyperlinks
Transcripts flattened links to "text ( url )", so the model copied that shape and drafts came back with the URL in brackets instead of a link. HTML to text for the LLM now writes "[text](url)", which Markdown2HTML turns back into an anchor.
This commit is contained in:
@@ -48,11 +48,6 @@ func HTML2Text(html string) string {
|
||||
return htmlToText(html, html2text.Options{TextOnly: true})
|
||||
}
|
||||
|
||||
// HTML2TextWithLinks converts HTML to text keeping link URLs as "text ( url )".
|
||||
func HTML2TextWithLinks(html string) string {
|
||||
return htmlToText(html, html2text.Options{})
|
||||
}
|
||||
|
||||
// Markdown2HTML converts markdown to HTML, falling back to the input on error.
|
||||
func Markdown2HTML(md string) string {
|
||||
var b strings.Builder
|
||||
|
||||
Reference in New Issue
Block a user