Skip to content

Commit

Permalink
Fix trimming of markup section names (go-gitea#4863)
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolas Lenz <nicolas@eisfunke.com>
  • Loading branch information
Eisfunke authored and techknowlogick committed Sep 4, 2018
1 parent e48df3e commit 668a477
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/setting/setting.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 668a477

Please sign in to comment.