Skip to content
Permalink
Browse files
Deprecate Blackfriday and fix a potential deadlock in config
Note that the deadlock has not been seen earlier, in tests on in real Hugo sites.

Fixes #8792
Fixes #8791
  • Loading branch information
bep committed Jul 26, 2021
1 parent e09d788 commit c7252224c4fecfe8321f31b901e2510d98b657c4
Showing with 7 additions and 0 deletions.
  1. +1 −0 config/defaultConfigProvider.go
  2. +6 −0 hugolib/config.go
@@ -89,6 +89,7 @@ func (c *defaultConfigProvider) Get(k string) interface{} {
c.mu.RLock()
key, m := c.getNestedKeyAndMap(strings.ToLower(k), false)
if m == nil {
c.mu.RUnlock()
return nil
}
v := m[key]
@@ -107,12 +107,18 @@ func LoadConfig(d ConfigSourceDescriptor, doWithConfig ...func(cfg config.Provid
}
}

// Config deprecations.
// We made this a Glob pattern in Hugo 0.75, we don't need both.
if l.cfg.GetBool("ignoreVendor") {
helpers.Deprecated("--ignoreVendor", "--ignoreVendorPaths **", true)
l.cfg.Set("ignoreVendorPaths", "**")
}

if l.cfg.GetString("markup.defaultMarkdownHandler") == "blackfriday" {
helpers.Deprecated("markup.defaultMarkdownHandler=blackfriday", "See https://gohugo.io//content-management/formats/#list-of-content-formats", false)

}

// Some settings are used before we're done collecting all settings,
// so apply OS environment both before and after.
if err := l.applyOsEnvOverrides(d.Environ); err != nil {

0 comments on commit c725222

Please sign in to comment.