Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
Daniel 2025-10-28 20:36:35 +08:00
parent 3d50e40177
commit fc4cadfd58
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
5 changed files with 44 additions and 36 deletions

View file

@ -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],