init push
This commit is contained in:
9
backend/pkg/bot/utils/utils.go
Normal file
9
backend/pkg/bot/utils/utils.go
Normal file
@@ -0,0 +1,9 @@
|
||||
package utils
|
||||
|
||||
import (
|
||||
"github.com/russross/blackfriday/v2"
|
||||
)
|
||||
|
||||
func Markdown2HTML(md string) string {
|
||||
return string(blackfriday.Run([]byte(md), blackfriday.WithRenderer(blackfriday.NewHTMLRenderer(blackfriday.HTMLRendererParameters{Flags: blackfriday.UseXHTML | blackfriday.CompletePage}))))
|
||||
}
|
||||
Reference in New Issue
Block a user