🎨 Improve kernel API /api/block/insertBlock argument checking https://github.com/siyuan-note/siyuan/issues/10144

This commit is contained in:
Daniel 2024-01-11 11:11:52 +08:00
parent 03f2f628f3
commit caf0717a73
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
4 changed files with 57 additions and 11 deletions

View file

@ -1009,7 +1009,7 @@ func CreateDocByMd(boxID, p, title, md string, sorts []string) (tree *parse.Tree
}
luteEngine := util.NewLute()
dom := luteEngine.Md2BlockDOM(md, false)
dom, _ := luteEngine.Md2BlockDOM(md, false)
tree, err = createDoc(box.ID, p, title, dom)
if nil != err {
return
@ -1032,7 +1032,7 @@ func CreateWithMarkdown(boxID, hPath, md, parentID, id string) (retID string, er
WaitForWritingFiles()
luteEngine := util.NewLute()
dom := luteEngine.Md2BlockDOM(md, false)
dom, _ := luteEngine.Md2BlockDOM(md, false)
retID, err = createDocsByHPath(box.ID, hPath, dom, parentID, id)
WaitForWritingFiles()
return