mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
parent
3d50e40177
commit
fc4cadfd58
5 changed files with 44 additions and 36 deletions
|
|
@ -149,6 +149,11 @@ func toFlatTree(blocks []*Block, baseDepth int, typ string, tree *parse.Tree) (r
|
|||
root.Children = append(root.Children, block)
|
||||
}
|
||||
|
||||
folded := false
|
||||
if "outline" == typ {
|
||||
folded = true
|
||||
}
|
||||
|
||||
for _, root := range blockRoots {
|
||||
treeNode := &Path{
|
||||
ID: root.ID,
|
||||
|
|
@ -159,6 +164,7 @@ func toFlatTree(blocks []*Block, baseDepth int, typ string, tree *parse.Tree) (r
|
|||
SubType: root.SubType,
|
||||
Depth: baseDepth,
|
||||
Count: len(root.Children),
|
||||
Folded: folded,
|
||||
|
||||
Updated: root.IAL["updated"],
|
||||
Created: root.ID[:14],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue