diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2021-04-20 06:25:08 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-19 18:25:08 -0400 |
commit | 9d99f6ab19ac3f97af3ca126720e9075c127a652 (patch) | |
tree | b817b4582a871f83b91ad7977fe772fc3501c1e8 /modules/setting | |
parent | c9cc6698d2172625854cd063301e63602204a2a1 (diff) | |
download | gitea-9d99f6ab19ac3f97af3ca126720e9075c127a652.tar.gz gitea-9d99f6ab19ac3f97af3ca126720e9075c127a652.zip |
Refactor renders (#15175)
* Refactor renders
* Some performance optimization
* Fix comment
* Transform reader
* Fix csv test
* Fix test
* Fix tests
* Improve optimaziation
* Fix test
* Fix test
* Detect file encoding with reader
* Improve optimaziation
* reduce memory usage
* improve code
* fix build
* Fix test
* Fix for go1.15
* Fix render
* Fix comment
* Fix lint
* Fix test
* Don't use NormalEOF when unnecessary
* revert change on util.go
* Apply suggestions from code review
Co-authored-by: zeripath <art27@cantab.net>
* rename function
* Take NormalEOF back
Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'modules/setting')
-rw-r--r-- | modules/setting/markup.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/setting/markup.go b/modules/setting/markup.go index 36cba68262..f0849a863a 100644 --- a/modules/setting/markup.go +++ b/modules/setting/markup.go @@ -13,14 +13,14 @@ import ( "gopkg.in/ini.v1" ) -// ExternalMarkupParsers represents the external markup parsers +// ExternalMarkupRenderers represents the external markup renderers var ( - ExternalMarkupParsers []MarkupParser - ExternalSanitizerRules []MarkupSanitizerRule + ExternalMarkupRenderers []MarkupRenderer + ExternalSanitizerRules []MarkupSanitizerRule ) -// MarkupParser defines the external parser configured in ini -type MarkupParser struct { +// MarkupRenderer defines the external parser configured in ini +type MarkupRenderer struct { Enabled bool MarkupName string Command string @@ -124,7 +124,7 @@ func newMarkupRenderer(name string, sec *ini.Section) { return } - ExternalMarkupParsers = append(ExternalMarkupParsers, MarkupParser{ + ExternalMarkupRenderers = append(ExternalMarkupRenderers, MarkupRenderer{ Enabled: sec.Key("ENABLED").MustBool(false), MarkupName: name, FileExtensions: exts, |