Skip to content

Commit 87bbe9f

Browse files
committed
Add support for goldmark-pikchr
1 parent 5ca40c8 commit 87bbe9f

3 files changed

Lines changed: 10 additions & 0 deletions

File tree

‎.gitignore‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,5 @@ resources/sunset.jpg
2626

2727
vendor
2828

29+
.hugo_build.lock
30+
public/

‎markup/goldmark/convert.go‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ import (
3434
"github.com/gohugoio/hugo/markup/converter"
3535
"github.com/gohugoio/hugo/markup/highlight"
3636
"github.com/gohugoio/hugo/markup/tableofcontents"
37+
"github.com/gopikchr/goldmark-pikchr"
3738
"github.com/yuin/goldmark"
3839
hl "github.com/yuin/goldmark-highlighting"
3940
"github.com/yuin/goldmark/extension"
@@ -136,6 +137,10 @@ func newMarkdown(pcfg converter.ProviderConfig) goldmark.Markdown {
136137
extensions = append(extensions, extension.Footnote)
137138
}
138139

140+
if cfg.Extensions.Pikchr {
141+
extensions = append(extensions, &pikchr.Extender{})
142+
}
143+
139144
if cfg.Parser.AutoHeadingID {
140145
parserOptions = append(parserOptions, parser.WithAutoHeadingID())
141146
}

‎markup/goldmark/goldmark_config/config.go‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ type Extensions struct {
6161
Strikethrough bool
6262
Linkify bool
6363
TaskList bool
64+
65+
// Extra extensions
66+
Pikchr bool
6467
}
6568

6669
type Renderer struct {

0 commit comments

Comments
 (0)