forked from forgejo/forgejo
Add NeedPostProcess for Parser interface to improve performance of csv render (#15153)
This commit is contained in:
parent
bf3e584de2
commit
66f0fd0959
8 changed files with 38 additions and 14 deletions
|
@ -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),
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue