summaryrefslogtreecommitdiffstats
path: root/modules/setting/markup.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/setting/markup.go')
-rw-r--r--modules/setting/markup.go8
1 files changed, 3 insertions, 5 deletions
diff --git a/modules/setting/markup.go b/modules/setting/markup.go
index b71a902be6..969e30e888 100644
--- a/modules/setting/markup.go
+++ b/modules/setting/markup.go
@@ -8,8 +8,6 @@ import (
"strings"
"code.gitea.io/gitea/modules/log"
-
- "gopkg.in/ini.v1"
)
// ExternalMarkupRenderers represents the external markup renderers
@@ -82,7 +80,7 @@ func loadMarkupFrom(rootCfg ConfigProvider) {
}
}
-func newMarkupSanitizer(name string, sec *ini.Section) {
+func newMarkupSanitizer(name string, sec ConfigSection) {
rule, ok := createMarkupSanitizerRule(name, sec)
if ok {
if strings.HasPrefix(name, "sanitizer.") {
@@ -99,7 +97,7 @@ func newMarkupSanitizer(name string, sec *ini.Section) {
}
}
-func createMarkupSanitizerRule(name string, sec *ini.Section) (MarkupSanitizerRule, bool) {
+func createMarkupSanitizerRule(name string, sec ConfigSection) (MarkupSanitizerRule, bool) {
var rule MarkupSanitizerRule
ok := false
@@ -141,7 +139,7 @@ func createMarkupSanitizerRule(name string, sec *ini.Section) (MarkupSanitizerRu
return rule, true
}
-func newMarkupRenderer(name string, sec *ini.Section) {
+func newMarkupRenderer(name string, sec ConfigSection) {
extensionReg := regexp.MustCompile(`\.\w`)
extensions := sec.Key("FILE_EXTENSIONS").Strings(",")