goldsmith/plugins/markdown/markdown_test.go

27 lines
617 B
Go
Raw Normal View History

2024-02-17 06:35:49 +00:00
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()),
)))
},
)
}