mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-18 07:30:12 +01:00
🎨 Improve dailynote template rendering https://github.com/siyuan-note/siyuan/issues/13111
This commit is contained in:
parent
76141021d0
commit
e69ea30a4e
1 changed files with 2 additions and 0 deletions
|
|
@ -497,6 +497,8 @@ func parseKTree(kramdown []byte) (ret *parse.Tree) {
|
||||||
func normalizeTree(tree *parse.Tree) (yfmRootID, yfmTitle, yfmUpdated string) {
|
func normalizeTree(tree *parse.Tree) (yfmRootID, yfmTitle, yfmUpdated string) {
|
||||||
if nil == tree.Root.FirstChild {
|
if nil == tree.Root.FirstChild {
|
||||||
tree.Root.AppendChild(treenode.NewParagraph(""))
|
tree.Root.AppendChild(treenode.NewParagraph(""))
|
||||||
|
} else if !tree.Root.FirstChild.IsBlock() || ast.NodeKramdownBlockIAL == tree.Root.FirstChild.Type {
|
||||||
|
tree.Root.PrependChild(treenode.NewParagraph(""))
|
||||||
}
|
}
|
||||||
|
|
||||||
var unlinks []*ast.Node
|
var unlinks []*ast.Node
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue