mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-02-28 05:32:52 +00:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@@ -596,7 +596,7 @@ func normalizeTree(tree *parse.Tree) (yfmRootID, yfmTitle, yfmUpdated string) {
|
||||
}
|
||||
continue
|
||||
}
|
||||
if "tags" == attrK {
|
||||
if "tags" == attrK && nil != attrV {
|
||||
var tags string
|
||||
if str, ok := attrV.(string); ok {
|
||||
tags = strings.TrimSpace(str)
|
||||
@@ -614,7 +614,10 @@ func normalizeTree(tree *parse.Tree) (yfmRootID, yfmTitle, yfmUpdated string) {
|
||||
tags += tagStr + ","
|
||||
}
|
||||
tags = strings.TrimRight(tags, ",")
|
||||
tree.Root.SetIALAttr("tags", tags)
|
||||
tags = strings.TrimSpace(tags)
|
||||
if "" != tags {
|
||||
tree.Root.SetIALAttr("tags", tags)
|
||||
}
|
||||
continue
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user