mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-04 07:48:49 +01:00
🎨 New a row in the database no longer require to create a relevant doc https://github.com/siyuan-note/siyuan/issues/9294
This commit is contained in:
parent
26db301a12
commit
ddffc27745
3 changed files with 22 additions and 10 deletions
|
|
@ -1028,7 +1028,7 @@ func CreateDocByMd(boxID, p, title, md string, sorts []string) (tree *parse.Tree
|
|||
return
|
||||
}
|
||||
|
||||
func CreateWithMarkdown(boxID, hPath, md, parentID string) (id string, err error) {
|
||||
func CreateWithMarkdown(boxID, hPath, md, parentID, id string) (err error) {
|
||||
box := Conf.Box(boxID)
|
||||
if nil == box {
|
||||
err = errors.New(Conf.Language(0))
|
||||
|
|
@ -1038,7 +1038,7 @@ func CreateWithMarkdown(boxID, hPath, md, parentID string) (id string, err error
|
|||
WaitForWritingFiles()
|
||||
luteEngine := util.NewLute()
|
||||
dom := luteEngine.Md2BlockDOM(md, false)
|
||||
id, _, err = createDocsByHPath(box.ID, hPath, dom, parentID)
|
||||
_, _, err = createDocsByHPath(box.ID, hPath, dom, parentID, id)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
@ -1442,7 +1442,7 @@ func CreateDailyNote(boxID string) (p string, existed bool, err error) {
|
|||
return
|
||||
}
|
||||
|
||||
id, existed, err := createDocsByHPath(box.ID, hPath, "", "")
|
||||
id, existed, err := createDocsByHPath(box.ID, hPath, "", "", "")
|
||||
if nil != err {
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue