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/14290

Vanessa386144955bc6
diff --git a/app/src/protyle/wysiwyg/input.ts b/app/src/protyle/wysiwyg/input.ts
index 302d51fb10..9f9b2f7baa 100644
--- a/app/src/protyle/wysiwyg/input.ts
+++ b/app/src/protyle/wysiwyg/input.ts
@@ -72,6 +72,11 @@ export const input = async (protyle: IProtyle, blockElement: HTMLElement, range:
(brNextElement as HTMLElement).getAttribute("data-type")?.indexOf("inline-math") > -1) {
wbrNextElement.remove();
}
+ // https://github.com/siyuan-note/siyuan/issues/14290
+ if (event.inputType === "deleteContentBackward" &&
+ wbrNextElement.previousSibling.previousSibling?.textContent.endsWith("\n")) {
+ wbrNextElement.outerHTML = "\n";
+ }
}
}
const id = blockElement.getAttribute("data-node-id");