Skip to content

Commit 89e4144

Browse files
wxiaoguangjerger
authored andcommitted
Set MERMAID_MAX_SOURCE_CHARACTERS to 50000 (go-gitea#34152)
Fix go-gitea#32015 (cherry picked from commit f8edc29)
1 parent 8665bbc commit 89e4144

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

custom/conf/app.example.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2444,7 +2444,7 @@ LEVEL = Info
24442444
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
24452445
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
24462446
;; Set the maximum number of characters in a mermaid source. (Set to -1 to disable limits)
2447-
;MERMAID_MAX_SOURCE_CHARACTERS = 5000
2447+
;MERMAID_MAX_SOURCE_CHARACTERS = 50000
24482448
;; Set the maximum number of lines allowed for a filepreview. (Set to -1 to disable limits; set to 0 to disable the feature)
24492449
;FILEPREVIEW_MAX_LINES = 50
24502450

modules/setting/markup.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ type MarkupSanitizerRule struct {
6262
func loadMarkupFrom(rootCfg ConfigProvider) {
6363
mustMapSetting(rootCfg, "markdown", &Markdown)
6464

65-
MermaidMaxSourceCharacters = rootCfg.Section("markup").Key("MERMAID_MAX_SOURCE_CHARACTERS").MustInt(5000)
65+
MermaidMaxSourceCharacters = rootCfg.Section("markup").Key("MERMAID_MAX_SOURCE_CHARACTERS").MustInt(50000)
6666
FilePreviewMaxLines = rootCfg.Section("markup").Key("FILEPREVIEW_MAX_LINES").MustInt(50)
6767
ExternalMarkupRenderers = make([]*MarkupRenderer, 0, 10)
6868
ExternalSanitizerRules = make([]MarkupSanitizerRule, 0, 10)

0 commit comments

Comments
 (0)