1
1
mirror of https://github.com/go-gitea/gitea synced 2025-08-11 20:18:20 +00:00

Fix trimming of markup section names (#4864)

Signed-off-by: Nicolas Lenz <nicolas@eisfunke.com>
This commit is contained in:
Nicolas Lenz
2018-09-04 03:43:16 +02:00
committed by techknowlogick
parent 38d8b8cf49
commit 745c898561

View File

@@ -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