From ee1509d96089739b2d784df14d3780337eb6e57c Mon Sep 17 00:00:00 2001 From: Vanessa Date: Fri, 16 Jan 2026 23:03:31 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/16157 --- app/src/protyle/util/insertHTML.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/protyle/util/insertHTML.ts b/app/src/protyle/util/insertHTML.ts index 6a831b3b8..66ca7e6f3 100644 --- a/app/src/protyle/util/insertHTML.ts +++ b/app/src/protyle/util/insertHTML.ts @@ -349,7 +349,8 @@ export const insertHTML = (html: string, protyle: IProtyle, isBlock = false, // 选中 ref**bbb** 后 alt+[ range.deleteContents(); // https://github.com/siyuan-note/siyuan/issues/14035 - if (range.startContainer.nodeType !== 3 && range.startContainer.textContent === "") { + if (range.startContainer.nodeType !== 3 && (range.startContainer as Element).tagName === "SPAN" && + range.startContainer.textContent === "") { // ref 选中处理 https://ld246.com/article/1629214377537 (range.startContainer as HTMLElement).remove(); }