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

This commit is contained in:
Daniel 2023-10-27 22:45:50 +08:00
parent a57c258fce
commit c485ef326b
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -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)