Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: https://github.com/siyuan-note/siyuan/issues/15932

Daniel54ddee0a9acb
diff --git a/kernel/model/block.go b/kernel/model/block.go
index 6873f01ad8..92db6a369f 100644
--- a/kernel/model/block.go
+++ b/kernel/model/block.go
@@ -211,9 +211,17 @@ func GetBlockSiblingID(id string) (parent, previous, next string) {
parent = parentBlock.ID
if nil != parentBlock.Previous {
previous = parentBlock.Previous.ID
+ } else {
+ if nil != current.Previous {
+ previous = current.Previous.ID
+ }
}
if nil != parentBlock.Next {
next = parentBlock.Next.ID
+ } else {
+ if nil != current.Next {
+ next = current.Next.ID
+ }
}
}
return