This commit is contained in:
Liang Ding
2022-10-05 10:29:00 +08:00
parent 7388c0d2a7
commit e34e7fe217
4 changed files with 64 additions and 3 deletions

View File

@@ -112,6 +112,9 @@ func toFlatTree(blocks []*Block, baseDepth int, typ string) (ret []*Path) {
SubType: root.SubType,
Depth: baseDepth,
Count: len(root.Children),
Updated: root.IAL["updated"],
Created: root.ID[:14],
}
for _, c := range root.Children {
treeNode.Blocks = append(treeNode.Blocks, c)
@@ -125,7 +128,6 @@ func toFlatTree(blocks []*Block, baseDepth int, typ string) (ret []*Path) {
return
}
func toSubTree(blocks []*Block, keyword string) (ret []*Path) {
keyword = strings.TrimSpace(keyword)
var blockRoots []*Block