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

Vanessae7e209c8bd65
diff --git a/app/src/protyle/wysiwyg/input.ts b/app/src/protyle/wysiwyg/input.ts
index 589ac72e2f..521392974e 100644
--- a/app/src/protyle/wysiwyg/input.ts
+++ b/app/src/protyle/wysiwyg/input.ts
@@ -67,7 +67,12 @@ export const input = async (protyle: IProtyle, blockElement: HTMLElement, range:
// https://github.com/siyuan-note/siyuan/issues/12468
if ((event.inputType === "deleteContentBackward" || event.inputType === "deleteContentForward") &&
wbrNextElement && wbrNextElement.nodeType === 1 && wbrNextElement.tagName === "BR") {
- wbrNextElement.remove();
+ // https://github.com/siyuan-note/siyuan/issues/13190
+ const brNextElement = hasNextSibling(wbrNextElement);
+ if (brNextElement && brNextElement.nodeType === 1 &&
+ (brNextElement as HTMLElement).getAttribute("data-type")?.indexOf("inline-math") > -1) {
+ wbrNextElement.remove();
+ }
}
}
const id = blockElement.getAttribute("data-node-id");