Fix regression of renderer (#16091)

* Fix regression of renderer

* Fix render setting load twice bug
This commit is contained in:
Lunny Xiao 2021-06-07 06:50:07 +08:00 committed by GitHub
parent b3ef6a61e5
commit b6762e2306
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 34 additions and 22 deletions

View file

@ -38,6 +38,8 @@ type MarkupSanitizerRule struct {
}
func newMarkup() {
ExternalMarkupRenderers = make([]MarkupRenderer, 0, 10)
ExternalSanitizerRules = make([]MarkupSanitizerRule, 0, 10)
for _, sec := range Cfg.Section("markup").ChildSections() {
name := strings.TrimPrefix(sec.Name(), "markup.")
if name == "" {