diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-05-28 11:01:47 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-05-29 11:50:58 +0200 |
commit | 0f8dc47037f59156c04540d97ed1b588e6bc1164 (patch) | |
tree | 78d76bb4d52b2f35b609013fde6ec4f5e19730c8 /markup/markup_config/config.go | |
parent | 3b478f50b7408ad78d085fa6dbc3c7a683c9d943 (diff) |
Remove Blackfriday markdown engine
It has been deprecated for a long time, its v1 version is not maintained anymore, and there are many known issues. Goldmark should be
a mature replacement by now.
Closes #9934
Diffstat (limited to 'markup/markup_config/config.go')
-rw-r--r-- | markup/markup_config/config.go | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/markup/markup_config/config.go b/markup/markup_config/config.go index ddcba8c3a..e254ba7a0 100644 --- a/markup/markup_config/config.go +++ b/markup/markup_config/config.go @@ -18,7 +18,6 @@ import ( "github.com/gohugoio/hugo/config" "github.com/gohugoio/hugo/docshelper" "github.com/gohugoio/hugo/markup/asciidocext/asciidocext_config" - "github.com/gohugoio/hugo/markup/blackfriday/blackfriday_config" "github.com/gohugoio/hugo/markup/goldmark/goldmark_config" "github.com/gohugoio/hugo/markup/highlight" "github.com/gohugoio/hugo/markup/tableofcontents" @@ -37,8 +36,6 @@ type Config struct { // Content renderers Goldmark goldmark_config.Config - BlackFriday blackfriday_config.Config - AsciidocExt asciidocext_config.Config } @@ -56,10 +53,6 @@ func Decode(cfg config.Provider) (conf Config, err error) { return } - if err = applyLegacyConfig(cfg, &conf); err != nil { - return - } - if err = highlight.ApplyLegacyConfig(cfg, &conf.Highlight); err != nil { return } @@ -83,26 +76,6 @@ func normalizeConfig(m map[string]any) { } } -func applyLegacyConfig(cfg config.Provider, conf *Config) error { - if bm := cfg.GetStringMap("blackfriday"); bm != nil { - // Legacy top level blackfriday config. - err := mapstructure.WeakDecode(bm, &conf.BlackFriday) - if err != nil { - return err - } - } - - if conf.BlackFriday.FootnoteAnchorPrefix == "" { - conf.BlackFriday.FootnoteAnchorPrefix = cfg.GetString("footnoteAnchorPrefix") - } - - if conf.BlackFriday.FootnoteReturnLinkContents == "" { - conf.BlackFriday.FootnoteReturnLinkContents = cfg.GetString("footnoteReturnLinkContents") - } - - return nil -} - var Default = Config{ DefaultMarkdownHandler: "goldmark", @@ -110,8 +83,6 @@ var Default = Config{ Highlight: highlight.DefaultConfig, Goldmark: goldmark_config.Default, - BlackFriday: blackfriday_config.Default, - AsciidocExt: asciidocext_config.Default, } |