mirror of
https://github.com/go-gitea/gitea.git
synced 2024-05-11 05:55:29 +00:00
Add NeedPostProcess for Parser interface to improve performance of csv render (#15153)
This commit is contained in:
@ -21,11 +21,12 @@ var (
|
||||
|
||||
// MarkupParser defines the external parser configured in ini
|
||||
type MarkupParser struct {
|
||||
Enabled bool
|
||||
MarkupName string
|
||||
Command string
|
||||
FileExtensions []string
|
||||
IsInputFile bool
|
||||
Enabled bool
|
||||
MarkupName string
|
||||
Command string
|
||||
FileExtensions []string
|
||||
IsInputFile bool
|
||||
NeedPostProcess bool
|
||||
}
|
||||
|
||||
// MarkupSanitizerRule defines the policy for whitelisting attributes on
|
||||
@ -124,10 +125,11 @@ func newMarkupRenderer(name string, sec *ini.Section) {
|
||||
}
|
||||
|
||||
ExternalMarkupParsers = append(ExternalMarkupParsers, MarkupParser{
|
||||
Enabled: sec.Key("ENABLED").MustBool(false),
|
||||
MarkupName: name,
|
||||
FileExtensions: exts,
|
||||
Command: command,
|
||||
IsInputFile: sec.Key("IS_INPUT_FILE").MustBool(false),
|
||||
Enabled: sec.Key("ENABLED").MustBool(false),
|
||||
MarkupName: name,
|
||||
FileExtensions: exts,
|
||||
Command: command,
|
||||
IsInputFile: sec.Key("IS_INPUT_FILE").MustBool(false),
|
||||
NeedPostProcess: sec.Key("NEED_POSTPROCESS").MustBool(true),
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user