1
mirror of https://gitlab.com/commento/commento.git synced 2025-04-28 18:40:29 -04:00
commento/api/markdown_html.go

11 lines
226 B
Go

package main
import (
"github.com/russross/blackfriday"
)
func markdownToHtml(markdown string) string {
unsafe := blackfriday.Markdown([]byte(markdown), renderer, extensions)
return string(policy.SanitizeBytes(unsafe))
}