diff options
author | Bjørn Erik Pedersen <[email protected]> | 2019-11-06 20:10:47 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2019-11-23 14:12:24 +0100 |
commit | bfb9613a14ab2d93a4474e5486d22e52a9d5e2b3 (patch) | |
tree | 81c4dbd10505e952489e1dbcf1d7bafc88b57c28 /markup/org | |
parent | a3fe5e5e35f311f22b6b4fc38abfcf64cd2c7d6f (diff) | |
download | hugo-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/org')
-rw-r--r-- | markup/org/convert.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/markup/org/convert.go b/markup/org/convert.go index a951e6fe1..4d6e5e2fa 100644 --- a/markup/org/convert.go +++ b/markup/org/convert.go @@ -23,19 +23,18 @@ import ( ) // Provider is the package entry point. -var Provider converter.NewProvider = provide{} +var Provider converter.ProviderProvider = provide{} type provide struct { } func (p provide) New(cfg converter.ProviderConfig) (converter.Provider, error) { - var n converter.NewConverter = func(ctx converter.DocumentContext) (converter.Converter, error) { + return converter.NewProvider("org", func(ctx converter.DocumentContext) (converter.Converter, error) { return &orgConverter{ ctx: ctx, cfg: cfg, }, nil - } - return n, nil + }), nil } type orgConverter struct { |