🎨 Add internal kernel API /api/block/getBlocksIndexes https://github.com/siyuan-note/siyuan/issues/10608

This commit is contained in:
Daniel 2024-03-18 16:23:13 +08:00
parent dc95dc3555
commit 1d3e28da6f
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -293,11 +293,14 @@ func GetBlocksIndexes(ids []string) (ret map[string]int) {
}
if !n.IsChildBlockOf(tree.Root, 1) {
if n.IsBlock() {
nodesIndexes[n.ID] = idx
}
return ast.WalkContinue
}
nodesIndexes[n.ID] = idx
idx++
nodesIndexes[n.ID] = idx
return ast.WalkContinue
})