commento/api/markdown_html.go
Adhityaa a090770b73 api: Add go files
I know this is a huge commit, but I can't be bothered to check
this in part by part.
2018-05-27 23:40:46 +05:30

11 lines
227 B
Go

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