mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 07:00:12 +01:00
🎨 Subdocuments created by the database are not displayed in the doc tree https://github.com/siyuan-note/siyuan/issues/9091
This commit is contained in:
parent
09f91258a1
commit
f80ae732b9
3 changed files with 14 additions and 14 deletions
|
|
@ -1011,7 +1011,7 @@ func CreateDocByMd(boxID, p, title, md string, sorts []string) (tree *parse.Tree
|
|||
return
|
||||
}
|
||||
|
||||
func CreateWithMarkdown(boxID, hPath, md, parentID string, showInDocTree bool) (id string, err error) {
|
||||
func CreateWithMarkdown(boxID, hPath, md, parentID string, hidden bool) (id string, err error) {
|
||||
box := Conf.Box(boxID)
|
||||
if nil == box {
|
||||
err = errors.New(Conf.Language(0))
|
||||
|
|
@ -1021,7 +1021,7 @@ func CreateWithMarkdown(boxID, hPath, md, parentID string, showInDocTree bool) (
|
|||
WaitForWritingFiles()
|
||||
luteEngine := util.NewLute()
|
||||
dom := luteEngine.Md2BlockDOM(md, false)
|
||||
id, _, err = createDocsByHPath(box.ID, hPath, dom, parentID, showInDocTree)
|
||||
id, _, err = createDocsByHPath(box.ID, hPath, dom, parentID, hidden)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
@ -1469,7 +1469,7 @@ func CreateDailyNote(boxID string) (p string, existed bool, err error) {
|
|||
return
|
||||
}
|
||||
|
||||
func createDoc(boxID, p, title, dom string, showInDocTree bool) (tree *parse.Tree, err error) {
|
||||
func createDoc(boxID, p, title, dom string, hidden bool) (tree *parse.Tree, err error) {
|
||||
title = gulu.Str.RemoveInvisible(title)
|
||||
if 512 < utf8.RuneCountInString(title) {
|
||||
// 限制笔记本名和文档名最大长度为 `512` https://github.com/siyuan-note/siyuan/issues/6299
|
||||
|
|
@ -1541,7 +1541,7 @@ func createDoc(boxID, p, title, dom string, showInDocTree bool) (tree *parse.Tre
|
|||
tree.Root.AppendChild(treenode.NewParagraph())
|
||||
}
|
||||
|
||||
if !showInDocTree {
|
||||
if !hidden {
|
||||
tree.Root.SetIALAttr("custom-hidden", "true")
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue