Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 committed Dec 6, 2024
2 parents c4bb218 + a1fdad7 commit ca5d906
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions kernel/model/box.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
}

Expand Down

0 comments on commit ca5d906

Please sign in to comment.