aboutsummaryrefslogtreecommitdiffhomepage
path: root/markup/rst
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2019-11-06 20:10:47 +0100
committerBjørn Erik Pedersen <[email protected]>2019-11-23 14:12:24 +0100
commitbfb9613a14ab2d93a4474e5486d22e52a9d5e2b3 (patch)
tree81c4dbd10505e952489e1dbcf1d7bafc88b57c28 /markup/rst
parenta3fe5e5e35f311f22b6b4fc38abfcf64cd2c7d6f (diff)
downloadhugo-bfb9613a14ab2d93a4474e5486d22e52a9d5e2b3.tar.gz
hugo-bfb9613a14ab2d93a4474e5486d22e52a9d5e2b3.zip
Add Goldmark as the new default markdown handler
This commit adds the fast and CommonMark compliant Goldmark as the new default markdown handler in Hugo. If you want to continue using BlackFriday as the default for md/markdown extensions, you can use this configuration: ```toml [markup] defaultMarkdownHandler="blackfriday" ``` Fixes #5963 Fixes #1778 Fixes #6355
Diffstat (limited to 'markup/rst')
-rw-r--r--markup/rst/convert.go8
1 files changed, 3 insertions, 5 deletions
diff --git a/markup/rst/convert.go b/markup/rst/convert.go
index e12e34f6d..040b40d79 100644
--- a/markup/rst/convert.go
+++ b/markup/rst/convert.go
@@ -25,20 +25,18 @@ import (
)
// Provider is the package entry point.
-var Provider converter.NewProvider = provider{}
+var Provider converter.ProviderProvider = provider{}
type provider struct {
}
func (p provider) New(cfg converter.ProviderConfig) (converter.Provider, error) {
- var n converter.NewConverter = func(ctx converter.DocumentContext) (converter.Converter, error) {
+ return converter.NewProvider("rst", func(ctx converter.DocumentContext) (converter.Converter, error) {
return &rstConverter{
ctx: ctx,
cfg: cfg,
}, nil
- }
- return n, nil
-
+ }), nil
}
type rstConverter struct {