2018-05-27 22:40:42 +08:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2018-08-13 02:06:51 +08:00
|
|
|
"github.com/russross/blackfriday"
|
2018-05-27 22:40:42 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
func markdownToHtml(markdown string) string {
|
|
|
|
unsafe := blackfriday.Markdown([]byte(markdown), renderer, extensions)
|
|
|
|
return string(policy.SanitizeBytes(unsafe))
|
|
|
|
}
|