diff --git a/modules/setting/setting.go b/modules/setting/setting.go index a5f4457f3..86b373e77 100644 --- a/modules/setting/setting.go +++ b/modules/setting/setting.go @@ -1112,7 +1112,7 @@ func NewContext() { extensionReg := regexp.MustCompile(`\.\w`) for _, sec := range Cfg.Section("markup").ChildSections() { - name := strings.TrimLeft(sec.Name(), "markup.") + name := strings.TrimPrefix(sec.Name(), "markup.") if name == "" { log.Warn("name is empty, markup " + sec.Name() + "ignored") continue