Use go-term-markdown

This commit is contained in:
Melroy van den Berg 2025-04-24 16:28:28 +02:00
parent 756832d8e5
commit b516ff57e6
No known key found for this signature in database
GPG key ID: 71D11FF23454B9D7

View file

@ -8,7 +8,7 @@ import (
"github.com/fatih/color"
"github.com/tidwall/gjson"
"github.com/vlanse/go-term-markdown"
markdown "github.com/vlanse/go-term-markdown"
)
// Format takes ActivityPub data and returns a formatted string representation
@ -357,7 +357,7 @@ func formatTombstone(jsonStr string, parts []string, bold, green, yellow func(a
// Helper to convert HTML to Markdown and render to terminal
func renderMarkdown(md string) string {
// width=80, no color override, no emoji, no images
return string(markdown.Render(md, 80, 6))
return string(markdown.Render(md, 78, 2))
}
// Replace stripHTML with htmlToMarkdown