Skip to content

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

:bug: Improve markdown import https://github.com/siyuan-note/siyuan/issues/13233

Daniel83b932478eff
diff --git a/kernel/model/box.go b/kernel/model/box.go
index dbb012dc4f..88a0b3713c 100644
--- a/kernel/model/box.go
+++ b/kernel/model/box.go
@@ -598,6 +598,12 @@ func normalizeTree(tree *parse.Tree) (yfmRootID, yfmTitle, yfmUpdated string) {
}
if "tags" == attrK {
var tags string
+ if str, ok := attrV.(string); ok {
+ tags = strings.TrimSpace(str)
+ tree.Root.SetIALAttr("tags", tags)
+ continue
+ }
+
for i, tag := range attrV.([]any) {
tagStr := strings.TrimSpace(tag.(string))
if "" == tag {