From 9a298928af4be67b7b6b8959b8c311b9b6db9139 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Mon, 9 Oct 2023 10:07:54 +0800 Subject: [PATCH] :lipstick: --- app/src/protyle/util/paste.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/protyle/util/paste.ts b/app/src/protyle/util/paste.ts index 6e4906df8..6a1fefeed 100644 --- a/app/src/protyle/util/paste.ts +++ b/app/src/protyle/util/paste.ts @@ -212,7 +212,8 @@ export const paste = async (protyle: IProtyle, event: (ClipboardEvent | DragEven // 粘贴在代码位置 // https://github.com/siyuan-note/siyuan/issues/9142 // https://github.com/siyuan-note/siyuan/issues/9323 - if (nodeElement.querySelector(".protyle-action").contains(range.startContainer)) { + // 需排除行内代码 https://github.com/siyuan-note/siyuan/issues/9369 + if (nodeElement.querySelector(".protyle-action")?.contains(range.startContainer)) { range.setStart(nodeElement.querySelector(".hljs").firstChild, 0); } insertHTML(textPlain, protyle);