From 386144955bc6897a400323ddc9578aeb4487fe10 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Wed, 7 May 2025 23:27:41 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/14290 --- app/src/protyle/wysiwyg/input.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/protyle/wysiwyg/input.ts b/app/src/protyle/wysiwyg/input.ts index 302d51fb1..9f9b2f7ba 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");