mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 07:00:12 +01:00
🐛 Improve markdown import https://github.com/siyuan-note/siyuan/issues/13233
This commit is contained in:
parent
b6cd6930c7
commit
83b932478e
1 changed files with 6 additions and 0 deletions
|
|
@ -598,6 +598,12 @@ func normalizeTree(tree *parse.Tree) (yfmRootID, yfmTitle, yfmUpdated string) {
|
||||||
}
|
}
|
||||||
if "tags" == attrK {
|
if "tags" == attrK {
|
||||||
var tags string
|
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) {
|
for i, tag := range attrV.([]any) {
|
||||||
tagStr := strings.TrimSpace(tag.(string))
|
tagStr := strings.TrimSpace(tag.(string))
|
||||||
if "" == tag {
|
if "" == tag {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue