An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:bug: Document cannot be exported as Markdown https://github.com/siyuan-note/siyuan/issues/13545
Daniel22ab71b72fc5
diff --git a/kernel/model/export.go b/kernel/model/export.goindex 4c6c33bf3c..fa833b3520 100644--- a/kernel/model/export.go+++ b/kernel/model/export.go@@ -1473,11 +1473,6 @@ func ExportNotebookMarkdown(boxID string) (zipPath string) {docFiles := box.ListFiles("/")var docPaths []stringfor _, docFile := range docFiles {- id := strings.TrimSuffix(path.Base(docFile.path), ".sy")- if !ast.IsNodeIDPattern(id) {- continue- }-docPaths = append(docPaths, docFile.path)}@@ -3108,11 +3103,11 @@ func prepareExportTrees(docPaths []string) (defBlockIDs []string, trees *map[strtreeCache := &map[string]*parse.Tree{}defBlockIDs = []string{}for _, p := range docPaths {- if strings.HasSuffix(p, ".sy") {+ id := strings.TrimSuffix(path.Base(p), ".sy")+ if !ast.IsNodeIDPattern(id) {continue}- id := util.GetTreeID(p)tree, err := loadTreeWithCache(id, treeCache)if err != nil {continue