🎨 Improve pandoc export

Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
Daniel 2026-02-12 17:38:26 +08:00
parent b59c6fda43
commit a38a4c80d2
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -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 {