An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:art: https://github.com/siyuan-note/siyuan/issues/15989 标题前删除需展开相关折叠的标题
Vanessadb31c47760db
diff --git a/app/src/protyle/wysiwyg/remove.ts b/app/src/protyle/wysiwyg/remove.tsindex f71ea5d62d..4f87193462 100644--- a/app/src/protyle/wysiwyg/remove.ts+++ b/app/src/protyle/wysiwyg/remove.ts@@ -12,7 +12,7 @@ import {import {transaction, turnsIntoOneTransaction, turnsIntoTransaction, updateTransaction} from "./transaction";import {cancelSB, genEmptyElement} from "../../block/util";import {listOutdent, updateListOrder} from "./list";-import {zoomOut} from "../../menus/protyle";+import {setFold, zoomOut} from "../../menus/protyle";import {preventScroll} from "../scroll/preventScroll";import {hideElements} from "../ui/hideElements";import {Constants} from "../../constants";@@ -300,13 +300,14 @@ export const removeBlock = async (protyle: IProtyle, blockElement: Element, rangreturn;}if (blockType === "NodeHeading") {- if ((blockElement.previousElementSibling &&- blockElement.previousElementSibling.getAttribute("data-type") === "NodeHeading" &&- blockElement.previousElementSibling.getAttribute("fold") === "1") ||- (blockElement.getAttribute("data-type") === "NodeHeading" &&- blockElement.getAttribute("fold") === "1")) {- focusBlock(blockElement.previousElementSibling, undefined, false);- return;+ if (blockElement.previousElementSibling &&+ blockElement.previousElementSibling.getAttribute("data-type") === "NodeHeading" &&+ blockElement.previousElementSibling.getAttribute("fold") === "1") {+ setFold(protyle, blockElement.previousElementSibling, true, false, false);+ }+ if (blockElement.getAttribute("data-type") === "NodeHeading" &&+ blockElement.getAttribute("fold") === "1") {+ setFold(protyle, blockElement, true, false, false);}turnsIntoTransaction({protyle: protyle,