Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: Supports setting Pandoc parameters for export docx https://github.com/siyuan-note/siyuan/issues/16845

Danielf7d43c48b359
diff --git a/kernel/model/conf.go b/kernel/model/conf.go
index 34dd01abc7..edb5cafa14 100644
--- a/kernel/model/conf.go
+++ b/kernel/model/conf.go
@@ -325,6 +325,9 @@ func InitConf() {
if "" != docxTemplate {
params := util.RemoveInvalid(Conf.Export.PandocParams)
if gulu.File.IsExist(docxTemplate) && !strings.Contains(params, "--reference-doc") {
+ if !strings.HasPrefix(docxTemplate, "\"") {
+ docxTemplate = "\"" + docxTemplate + "\""
+ }
params += " --reference-doc " + docxTemplate
Conf.Export.PandocParams = strings.TrimSpace(params)
}