mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 07:00:12 +01:00
🎨 Improve the behavior of Jump to parent block in lists https://github.com/siyuan-note/siyuan/issues/16516#issuecomment-3649752632
Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
parent
3b730ded8f
commit
1acbb7d06d
1 changed files with 5 additions and 0 deletions
|
|
@ -205,6 +205,11 @@ func GetBlockSiblingID(id string) (parent, previous, next string) {
|
||||||
if nil == current || !current.IsBlock() {
|
if nil == current || !current.IsBlock() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if nil != current.Parent && ast.NodeListItem == current.Parent.Type {
|
||||||
|
current = current.Parent
|
||||||
|
}
|
||||||
|
|
||||||
parentBlock := treenode.ParentBlock(current)
|
parentBlock := treenode.ParentBlock(current)
|
||||||
if nil == parentBlock {
|
if nil == parentBlock {
|
||||||
return
|
return
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue