mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-30 21:38:48 +01:00
🎨 Add internal kernel API /api/block/getBlocksIndexes https://github.com/siyuan-note/siyuan/issues/10608
This commit is contained in:
parent
dc95dc3555
commit
1d3e28da6f
1 changed files with 4 additions and 1 deletions
|
|
@ -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
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue