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/16197 06

Vanessa02bbd6bffd0f
diff --git a/app/src/protyle/wysiwyg/remove.ts b/app/src/protyle/wysiwyg/remove.ts
index a2de68284c..d47224da95 100644
--- a/app/src/protyle/wysiwyg/remove.ts
+++ b/app/src/protyle/wysiwyg/remove.ts
@@ -108,10 +108,8 @@ export const removeBlock = async (protyle: IProtyle, blockElement: Element, rang
}
let previousID = topElement.previousElementSibling ? topElement.previousElementSibling.getAttribute("data-node-id") : "";
if (topElement.previousElementSibling &&
- topElement.previousElementSibling.getAttribute("data-type") === "NodeHeading" && topElement.previousElementSibling.getAttribute("fold") === "1" &&
- (topElement.nextElementSibling?.getAttribute("data-type") !== "NodeHeading" ||
- (topElement.nextElementSibling?.getAttribute("data-type") === "NodeHeading" && topElement.nextElementSibling?.getAttribute("data-subtype") < topElement.getAttribute("data-subtype"))
- )) {
+ topElement.previousElementSibling.getAttribute("data-type") === "NodeHeading" &&
+ topElement.previousElementSibling.getAttribute("fold") === "1") {
const foldId = topElement.previousElementSibling.getAttribute("data-node-id");
if (!unfoldData[foldId]) {
const foldTransaction = await fetchSyncPost("/api/block/getHeadingDeleteTransaction", {