mirror of
https://github.com/knadh/listmonk.git
synced 2025-03-04 02:05:31 +08:00
Add AutoHeadingID option to Markdown parser
This commit is contained in:
parent
e46a5cdf78
commit
73e6668d20
1 changed files with 4 additions and 0 deletions
|
@ -15,6 +15,7 @@ import (
|
||||||
"github.com/jmoiron/sqlx/types"
|
"github.com/jmoiron/sqlx/types"
|
||||||
"github.com/lib/pq"
|
"github.com/lib/pq"
|
||||||
"github.com/yuin/goldmark"
|
"github.com/yuin/goldmark"
|
||||||
|
"github.com/yuin/goldmark/parser"
|
||||||
"github.com/yuin/goldmark/extension"
|
"github.com/yuin/goldmark/extension"
|
||||||
"github.com/yuin/goldmark/renderer/html"
|
"github.com/yuin/goldmark/renderer/html"
|
||||||
null "gopkg.in/volatiletech/null.v6"
|
null "gopkg.in/volatiletech/null.v6"
|
||||||
|
@ -261,6 +262,9 @@ type Bounce struct {
|
||||||
|
|
||||||
// markdown is a global instance of Markdown parser and renderer.
|
// markdown is a global instance of Markdown parser and renderer.
|
||||||
var markdown = goldmark.New(
|
var markdown = goldmark.New(
|
||||||
|
goldmark.WithParserOptions(
|
||||||
|
parser.WithAutoHeadingID(),
|
||||||
|
),
|
||||||
goldmark.WithRendererOptions(
|
goldmark.WithRendererOptions(
|
||||||
html.WithXHTML(),
|
html.WithXHTML(),
|
||||||
html.WithUnsafe(),
|
html.WithUnsafe(),
|
||||||
|
|
Loading…
Reference in a new issue