Skip to content

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

:bug: Export Markdown does not include .md file Fix https://github.com/siyuan-note/siyuan/issues/8587

Danielf6c6dff90ed0
diff --git a/kernel/util/pandoc.go b/kernel/util/pandoc.go
index 9c4884f180..5e42ecf6c7 100644
--- a/kernel/util/pandoc.go
+++ b/kernel/util/pandoc.go
@@ -52,6 +52,9 @@ func ConvertPandoc(args ...string) (err error) {
func Pandoc(from, to, o, content string) (err error) {
if "" == from || "" == to || "md" == to {
+ if err = gulu.File.WriteFileSafer(o, []byte(content), 0644); nil != err {
+ logging.LogErrorf("write export markdown file [%s] failed: %s", o, err)
+ }
return
}