mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-10 04:59:03 +08:00
🎨 文档块转换为标题块时将文档标签移动到标题块下方 Fix https://github.com/siyuan-note/siyuan/issues/6550
This commit is contained in:
parent
2f0194aca5
commit
37421e0184
@ -163,7 +163,7 @@ func Doc2Heading(srcID, targetID string, after bool) (srcTreeBox, srcTreePath st
|
|||||||
heading.AppendChild(&ast.Node{Type: ast.NodeText, Tokens: []byte(srcTree.Root.IALAttr("title"))})
|
heading.AppendChild(&ast.Node{Type: ast.NodeText, Tokens: []byte(srcTree.Root.IALAttr("title"))})
|
||||||
heading.Box = targetTree.Box
|
heading.Box = targetTree.Box
|
||||||
heading.Path = targetTree.Path
|
heading.Path = targetTree.Path
|
||||||
if 0 < len(tags) {
|
if "" != tagIAL && 0 < len(tags) {
|
||||||
// 带标签的文档块转换为标题块时将标签移动到标题块下方 https://github.com/siyuan-note/siyuan/issues/6550
|
// 带标签的文档块转换为标题块时将标签移动到标题块下方 https://github.com/siyuan-note/siyuan/issues/6550
|
||||||
|
|
||||||
tagPara := parse.NewParagraph()
|
tagPara := parse.NewParagraph()
|
||||||
@ -177,8 +177,10 @@ func Doc2Heading(srcID, targetID string, after bool) (srcTreeBox, srcTreePath st
|
|||||||
tagPara.AppendChild(&ast.Node{Type: ast.NodeText, Tokens: []byte(" ")})
|
tagPara.AppendChild(&ast.Node{Type: ast.NodeText, Tokens: []byte(" ")})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if nil != tagPara.FirstChild {
|
||||||
srcTree.Root.PrependChild(tagPara)
|
srcTree.Root.PrependChild(tagPara)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var nodes []*ast.Node
|
var nodes []*ast.Node
|
||||||
if after {
|
if after {
|
||||||
|
Loading…
Reference in New Issue
Block a user