mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-02-28 05:32:52 +00:00
🐛 导入空内容 Markdown 文件时报错 Fix https://github.com/siyuan-note/siyuan/issues/6832
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user