1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-23 10:48:37 +00:00

Fix wrong init dependency on markup extensions (#7038) (#7074)

* fix wrong init dependency on markup extensions
This commit is contained in:
Lunny Xiao
2019-05-30 00:05:36 +08:00
committed by techknowlogick
parent d07edc5336
commit 31ad8b7026
4 changed files with 12 additions and 3 deletions

View File

@@ -15,6 +15,14 @@ import (
func Init() {
getIssueFullPattern()
NewSanitizer()
// since setting maybe changed extensions, this will reload all parser extensions mapping
extParsers = make(map[string]Parser)
for _, parser := range parsers {
for _, ext := range parser.Extensions() {
extParsers[strings.ToLower(ext)] = parser
}
}
}
// Parser defines an interface for parsering markup file to HTML