From fdd2cefee37c0c72eb16d337a802de15f52269f4 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sat, 17 Aug 2024 11:50:07 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/12239 --- app/src/protyle/wysiwyg/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/protyle/wysiwyg/index.ts b/app/src/protyle/wysiwyg/index.ts index ab3f9abba..da6eb6c62 100644 --- a/app/src/protyle/wysiwyg/index.ts +++ b/app/src/protyle/wysiwyg/index.ts @@ -176,6 +176,9 @@ export class WYSIWYG { if (inputData === "<" || inputData === ">") { // 使用 inlineElement.innerHTML 会出现 https://ld246.com/article/1627185027423 中的第2个问题 dataLength = 4; + } else if (inputData === "&") { + // https://github.com/siyuan-note/siyuan/issues/12239 + dataLength = 5; } // https://github.com/siyuan-note/siyuan/issues/5924 if (currentTypes.length > 0 && range.toString() === "" && range.startOffset === inputData.length &&