mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🐛 导入空内容 Markdown 文件时报错 Fix https://github.com/siyuan-note/siyuan/issues/6832
This commit is contained in:
parent
81e5bdc32a
commit
8da31e7b1c
1 changed files with 4 additions and 0 deletions
|
|
@ -464,6 +464,10 @@ func parseKTree(kramdown []byte) (ret *parse.Tree) {
|
|||
}
|
||||
|
||||
func genTreeID(tree *parse.Tree) {
|
||||
if nil == tree.Root.FirstChild {
|
||||
tree.Root.AppendChild(parse.NewParagraph())
|
||||
}
|
||||
|
||||
ast.Walk(tree.Root, func(n *ast.Node, entering bool) ast.WalkStatus {
|
||||
if !entering {
|
||||
return ast.WalkContinue
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue