mirror of
https://github.com/apricote/releaser-pleaser.git
synced 2026-02-07 18:27:03 +00:00
refactor: replace markdown renderer (#40)
The new renderer is actually published as a module and can be extended through the usual goldmark extensions.
This commit is contained in:
parent
a0a064d387
commit
4cb22eae10
8 changed files with 49 additions and 900 deletions
|
|
@ -1,17 +1,15 @@
|
|||
package markdown
|
||||
|
||||
import (
|
||||
markdown "github.com/teekennedy/goldmark-markdown"
|
||||
"github.com/yuin/goldmark"
|
||||
"github.com/yuin/goldmark/renderer"
|
||||
"github.com/yuin/goldmark/util"
|
||||
|
||||
"github.com/apricote/releaser-pleaser/internal/markdown/extensions"
|
||||
"github.com/apricote/releaser-pleaser/internal/markdown/renderer/markdown"
|
||||
)
|
||||
|
||||
func New() goldmark.Markdown {
|
||||
return goldmark.New(
|
||||
goldmark.WithExtensions(extensions.Section),
|
||||
goldmark.WithRenderer(renderer.NewRenderer(renderer.WithNodeRenderers(util.Prioritized(markdown.NewRenderer(), 1)))),
|
||||
goldmark.WithRenderer(markdown.NewRenderer()),
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue