Skip to content

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

:art: 导入单个 Md 时设置格式版本

Liang Dingd60e73cd4cb0
diff --git a/kernel/model/import.go b/kernel/model/import.go
index 52d58c9813..2154d2c911 100644
--- a/kernel/model/import.go
+++ b/kernel/model/import.go
@@ -584,6 +584,7 @@ func ImportFromLocalPath(boxID, localPath string, toPath string) (err error) {
tree.Box = boxID
tree.Path = targetPath
tree.HPath = path.Join(baseHPath, title)
+ tree.Root.Spec = "1"
luteEngine.NestedInlines2FlattedSpans(tree)
docDirLocalPath := filepath.Dir(filepath.Join(boxLocalPath, targetPath))