package markdown import ( "github.com/charmbracelet/glamour" "strings" ) func normalizeNewlines(s string) string { s = strings.ReplaceAll(s, "\r\n", "\n") s = strings.ReplaceAll(s, "\r", "\n") return s } func Render(text string) (string, error) { return glamour.Render(normalizeNewlines(text), "dark") }