mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-09-22 00:20:47 +02:00
Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
parent
9f76274747
commit
eca318c4ff
1 changed files with 16 additions and 0 deletions
|
@ -234,6 +234,22 @@ func GetBlockSiblingID(id string) (parent, previous, next string) {
|
|||
next = flb.ID
|
||||
}
|
||||
}
|
||||
|
||||
if "" == previous && "" == next && nil != current {
|
||||
parent = current.ID
|
||||
if nil != current.Previous {
|
||||
previous = current.Previous.ID
|
||||
if flb := treenode.FirstChildBlock(current.Previous); nil != flb {
|
||||
previous = flb.ID
|
||||
}
|
||||
}
|
||||
if nil != current.Next {
|
||||
next = current.Next.ID
|
||||
if flb := treenode.FirstChildBlock(current.Next); nil != flb {
|
||||
next = flb.ID
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue