goldsmith/plugins/markdown/markdown_test.go
2024-02-16 22:35:49 -08:00

27 lines
617 B
Go

package markdown
import (
"testing"
"github.com/yuin/goldmark"
"github.com/yuin/goldmark/extension"
"github.com/yuin/goldmark/parser"
"github.com/yuin/goldmark/renderer/html"
"git.foosoft.net/alex/goldsmith"
"git.foosoft.net/alex/goldsmith/harness"
)
func Test(self *testing.T) {
harness.Validate(
self,
func(gs *goldsmith.Goldsmith) {
gs.Chain(NewWithGoldmark(goldmark.New(
goldmark.WithExtensions(extension.GFM, extension.Typographer, extension.DefinitionList),
goldmark.WithParserOptions(parser.WithAutoHeadingID()),
goldmark.WithRendererOptions(html.WithUnsafe()),
)))
},
)
}