From ccc9bc6518d26fe0ca7287fb6e854f3814eb4323 Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Mon, 11 Sep 2023 22:36:20 +0800 Subject: [PATCH 1/2] :bug: The super block below the folded heading contains headings of the same level and cannot be loaded Fix https://github.com/siyuan-note/siyuan/issues/9162 --- kernel/treenode/heading.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/kernel/treenode/heading.go b/kernel/treenode/heading.go index 6527fe26f..b90bffd88 100644 --- a/kernel/treenode/heading.go +++ b/kernel/treenode/heading.go @@ -58,6 +58,24 @@ func MoveFoldHeading(updateNode, oldNode *ast.Node) { } func IsInFoldedHeading(node, currentHeading *ast.Node) bool { + if nil == node { + return false + } + + if ast.NodeSuperBlock == node.Type { + // The super block below the folded heading contains headings of the same level and cannot be loaded https://github.com/siyuan-note/siyuan/issues/9162 + if nil == currentHeading { + return false + } + + sbChildHeading := SuperBlockHeading(node) + if nil != sbChildHeading { + if sbChildHeading.HeadingLevel <= currentHeading.HeadingLevel { + return false + } + } + } + heading := HeadingParent(node) if nil == heading { return false From 5012112daee8656632e98542f18eaa6c2d54e395 Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Mon, 11 Sep 2023 22:38:23 +0800 Subject: [PATCH 2/2] :bookmark: Release v2.10.5 --- app/changelogs/v2.10.5/v2.10.5.md | 1 + app/changelogs/v2.10.5/v2.10.5_zh_CHT.md | 1 + app/changelogs/v2.10.5/v2.10.5_zh_CN.md | 1 + 3 files changed, 3 insertions(+) diff --git a/app/changelogs/v2.10.5/v2.10.5.md b/app/changelogs/v2.10.5/v2.10.5.md index 5f4701c7f..837234d24 100644 --- a/app/changelogs/v2.10.5/v2.10.5.md +++ b/app/changelogs/v2.10.5/v2.10.5.md @@ -32,6 +32,7 @@ Below are the detailed changes in this version. * [Inaccurate positioning when jumping from reference to block in new window](https://github.com/siyuan-note/siyuan/issues/9149) * [The new window userAgent is missing](https://github.com/siyuan-note/siyuan/issues/9153) * [When custom Emoji exists in the selected content, setting inline-level marks will delete the content](https://github.com/siyuan-note/siyuan/issues/9156) +* [The super block below the folded heading contains headings of the same level and cannot be loaded](https://github.com/siyuan-note/siyuan/issues/9162) ### Development diff --git a/app/changelogs/v2.10.5/v2.10.5_zh_CHT.md b/app/changelogs/v2.10.5/v2.10.5_zh_CHT.md index 5c388ce1e..cf5aff191 100644 --- a/app/changelogs/v2.10.5/v2.10.5_zh_CHT.md +++ b/app/changelogs/v2.10.5/v2.10.5_zh_CHT.md @@ -32,6 +32,7 @@ * [從塊引用跳轉新窗口的塊時定位不正確](https://github.com/siyuan-note/siyuan/issues/9149) * [新窗口丟失 user-agent 請求標頭](https://github.com/siyuan-note/siyuan/issues/9153) * [劃選內容包含自定義表情時設置行級標記會刪除內容](https://github.com/siyuan-note/siyuan/issues/9156) +* [折疊標題下方超級塊包含同級標題無法加載](https://github.com/siyuan-note/siyuan/issues/9162) ### 開發者 diff --git a/app/changelogs/v2.10.5/v2.10.5_zh_CN.md b/app/changelogs/v2.10.5/v2.10.5_zh_CN.md index 697f3a192..822626ef4 100644 --- a/app/changelogs/v2.10.5/v2.10.5_zh_CN.md +++ b/app/changelogs/v2.10.5/v2.10.5_zh_CN.md @@ -32,6 +32,7 @@ * [从块引用跳转新窗口的块时定位不正确](https://github.com/siyuan-note/siyuan/issues/9149) * [新窗口丢失 user-agent 请求标头](https://github.com/siyuan-note/siyuan/issues/9153) * [划选内容包含自定义表情时设置行级标记会删除内容](https://github.com/siyuan-note/siyuan/issues/9156) +* [折叠标题下方超级块包含同级标题无法加载](https://github.com/siyuan-note/siyuan/issues/9162) ### 开发者