From a38a4c80d2953fa5fc887eb23e8d9a10c5bda954 Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Thu, 12 Feb 2026 17:38:26 +0800 Subject: [PATCH] :art: Improve pandoc export Signed-off-by: Daniel <845765@qq.com> --- kernel/util/pandoc.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kernel/util/pandoc.go b/kernel/util/pandoc.go index 67470c367..2b1bb41bf 100644 --- a/kernel/util/pandoc.go +++ b/kernel/util/pandoc.go @@ -111,6 +111,8 @@ func InitPandoc() { return } + defer eventbus.Publish(EvtConfPandocInitialized) + PandocTemplatePath = filepath.Join(WorkingDir, "pandoc-resources", "pandoc-template.docx") if !gulu.File.IsExist(PandocTemplatePath) { PandocTemplatePath = filepath.Join(WorkingDir, "pandoc", "pandoc-resources", "pandoc-template.docx") @@ -129,10 +131,7 @@ func InitPandoc() { logging.LogWarnf("pandoc color filter file [%s] not found", PandocColorFilterPath) } - defer eventbus.Publish(EvtConfPandocInitialized) - tempPandocDir := filepath.Join(TempDir, "pandoc") - if confPath := filepath.Join(ConfDir, "conf.json"); gulu.File.IsExist(confPath) { // Workspace built-in Pandoc is no longer initialized after customizing Pandoc path https://github.com/siyuan-note/siyuan/issues/8377 if data, err := os.ReadFile(confPath); err == nil {