0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-11-28 22:48:13 +01:00

Fix trimming of markup section names (#4863)

Signed-off-by: Nicolas Lenz <nicolas@eisfunke.com>
This commit is contained in:
Nicolas Lenz 2018-09-04 02:59:02 +02:00 committed by techknowlogick
parent e48df3ee47
commit 668a477c69

View file

@ -1155,7 +1155,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