goldmark-formatter
This goldmark renderer extension adds support for formatting markdown.
source := []byte("# Title\nParagraph *em **bold*** [link](/).")
md := goldmark.New(
goldmark.WithRenderer(formatter.Markdown), // markdown output
)
if err := md.Convert(source, os.Stdout); err != nil {
log.Fatal(err)
}
Title
=====
Paragraph *em **bold*** [link](/).