hicli/send: fix image html to markdown conversion for editing

This commit is contained in:
Tulir Asokan 2024-11-02 14:03:39 +02:00
parent c4d6e487da
commit 4742ca3116

View file

@ -53,9 +53,9 @@ func init() {
}
htmlToMarkdownForInput.ImageConverter = func(src, alt, title, width, height string, isEmoji bool) string {
if isEmoji {
return fmt.Sprintf(`![%s](%s "Emoji: %q")`, alt, src, title)
return fmt.Sprintf(`![%s](%s %q)`, alt, src, "Emoji: "+title)
} else if title != "" {
return fmt.Sprintf(`![%s](%s "%s")`, alt, src, title)
return fmt.Sprintf(`![%s](%s %q)`, alt, src, title)
} else {
return fmt.Sprintf(`![%s](%s)`, alt, src)
}