mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-02-28 05:32:52 +00:00
🎨 Add internal kernel API /api/block/getBlocksIndexes https://github.com/siyuan-note/siyuan/issues/10608
This commit is contained in:
@@ -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
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user