forked from forgejo/forgejo
Add setting to restrict count of lines being displayed & only highlight those lines
This commit is contained in:
parent
069d87b80f
commit
2b6546adc9
9 changed files with 117 additions and 28 deletions
|
@ -15,6 +15,7 @@ var (
|
|||
ExternalMarkupRenderers []*MarkupRenderer
|
||||
ExternalSanitizerRules []MarkupSanitizerRule
|
||||
MermaidMaxSourceCharacters int
|
||||
FilePreviewMaxLines int
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -62,6 +63,7 @@ func loadMarkupFrom(rootCfg ConfigProvider) {
|
|||
mustMapSetting(rootCfg, "markdown", &Markdown)
|
||||
|
||||
MermaidMaxSourceCharacters = rootCfg.Section("markup").Key("MERMAID_MAX_SOURCE_CHARACTERS").MustInt(5000)
|
||||
FilePreviewMaxLines = rootCfg.Section("markup").Key("FILEPREVIEW_MAX_LINES").MustInt(50)
|
||||
ExternalMarkupRenderers = make([]*MarkupRenderer, 0, 10)
|
||||
ExternalSanitizerRules = make([]MarkupSanitizerRule, 0, 10)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue