Skip to content

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

:art: Improve automatic deletion when block attribute value is empty https://github.com/siyuan-note/siyuan/issues/9529

Danielc485ef326b40
diff --git a/kernel/model/blockial.go b/kernel/model/blockial.go
index c7f3fab914..e8bfa2b478 100644
--- a/kernel/model/blockial.go
+++ b/kernel/model/blockial.go
@@ -182,7 +182,7 @@ func setNodeAttrs0(node *ast.Node, nameValues map[string]string) (oldAttrs map[s
continue
}
- if "" == value {
+ if "" == strings.TrimSpace(value) {
node.RemoveIALAttr(name)
} else {
node.SetIALAttr(name, value)