summaryrefslogtreecommitdiffstats
path: root/modules/setting
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2021-06-07 06:50:07 +0800
committerGitHub <noreply@github.com>2021-06-06 18:50:07 -0400
commitb6762e23060972f0ad35aeab48850064687ea400 (patch)
treeea0a65b706c23c0888e3931610bf2d3e79b9938a /modules/setting
parentb3ef6a61e5fc3f9d64e3a9f61fb0027cbb48ba73 (diff)
downloadgitea-b6762e23060972f0ad35aeab48850064687ea400.tar.gz
gitea-b6762e23060972f0ad35aeab48850064687ea400.zip
Fix regression of renderer (#16091)
* Fix regression of renderer * Fix render setting load twice bug
Diffstat (limited to 'modules/setting')
-rw-r--r--modules/setting/markup.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/setting/markup.go b/modules/setting/markup.go
index f0849a863a..43df4ce442 100644
--- a/modules/setting/markup.go
+++ b/modules/setting/markup.go
@@ -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 == "" {