2026-04-24 07:57:33 +01:00
|
|
|
diff --git a/modules/markup/markdown/markdown.go b/modules/markup/markdown/markdown.go
|
|
|
|
|
index 2b19e0f1c9..12be3e1c24 100644
|
|
|
|
|
--- a/modules/markup/markdown/markdown.go
|
|
|
|
|
+++ b/modules/markup/markdown/markdown.go
|
|
|
|
|
@@ -116,6 +116,7 @@ func SpecializedMarkdown() goldmark.Markdown {
|
|
|
|
|
math.NewExtension(
|
|
|
|
|
math.Enabled(setting.Markdown.EnableMath),
|
|
|
|
|
),
|
|
|
|
|
+ NewIfcURLExtension(),
|
|
|
|
|
),
|
|
|
|
|
goldmark.WithParserOptions(
|
|
|
|
|
parser.WithAttribute(),
|
|
|
|
|
diff --git a/modules/setting/markup.go b/modules/setting/markup.go
|
2026-04-26 00:37:15 +01:00
|
|
|
index 4ab9e7b2d1..862852381e 100644
|
2026-04-24 07:57:33 +01:00
|
|
|
--- a/modules/setting/markup.go
|
|
|
|
|
+++ b/modules/setting/markup.go
|
2026-04-26 00:37:15 +01:00
|
|
|
@@ -59,8 +59,15 @@ type MarkupSanitizerRule struct {
|
2026-04-24 07:57:33 +01:00
|
|
|
AllowDataURIImages bool
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
+// IfcURL holds configuration for the ifcurl preview service integration.
|
|
|
|
|
+var IfcURL = struct {
|
|
|
|
|
+ PreviewServiceURL string `ini:"PREVIEW_SERVICE_URL"`
|
2026-04-24 14:20:17 +01:00
|
|
|
+ ServiceToken string `ini:"SERVICE_TOKEN"`
|
2026-04-24 07:57:33 +01:00
|
|
|
+}{}
|
|
|
|
|
+
|
|
|
|
|
func loadMarkupFrom(rootCfg ConfigProvider) {
|
|
|
|
|
mustMapSetting(rootCfg, "markdown", &Markdown)
|
|
|
|
|
+ mustMapSetting(rootCfg, "ifcurl", &IfcURL)
|
|
|
|
|
|
|
|
|
|
MermaidMaxSourceCharacters = rootCfg.Section("markup").Key("MERMAID_MAX_SOURCE_CHARACTERS").MustInt(50000)
|
|
|
|
|
FilePreviewMaxLines = rootCfg.Section("markup").Key("FILEPREVIEW_MAX_LINES").MustInt(50)
|