mirror of
https://github.com/yuin/goldmark
synced 2025-03-04 23:04:52 +00:00
Fuzz more code paths
This commit is contained in:
parent
567046a85d
commit
25f82f0a2d
1 changed files with 9 additions and 0 deletions
|
|
@ -5,19 +5,28 @@ import (
|
||||||
|
|
||||||
"github.com/yuin/goldmark"
|
"github.com/yuin/goldmark"
|
||||||
"github.com/yuin/goldmark/extension"
|
"github.com/yuin/goldmark/extension"
|
||||||
|
"github.com/yuin/goldmark/parser"
|
||||||
"github.com/yuin/goldmark/renderer/html"
|
"github.com/yuin/goldmark/renderer/html"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Fuzz runs automated fuzzing against goldmark.
|
// Fuzz runs automated fuzzing against goldmark.
|
||||||
func Fuzz(data []byte) int {
|
func Fuzz(data []byte) int {
|
||||||
markdown := goldmark.New(
|
markdown := goldmark.New(
|
||||||
|
goldmark.WithParserOptions(
|
||||||
|
parser.WithAutoHeadingID(),
|
||||||
|
parser.WithAttribute(),
|
||||||
|
),
|
||||||
goldmark.WithRendererOptions(
|
goldmark.WithRendererOptions(
|
||||||
html.WithUnsafe(),
|
html.WithUnsafe(),
|
||||||
|
html.WithXHTML(),
|
||||||
),
|
),
|
||||||
goldmark.WithExtensions(
|
goldmark.WithExtensions(
|
||||||
extension.DefinitionList,
|
extension.DefinitionList,
|
||||||
extension.Footnote,
|
extension.Footnote,
|
||||||
extension.GFM,
|
extension.GFM,
|
||||||
|
extension.Linkify,
|
||||||
|
extension.Table,
|
||||||
|
extension.TaskList,
|
||||||
extension.Typographer,
|
extension.Typographer,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue