From c70a46d940543a381670fe7942a9fb8e281717e8 Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Sat, 2 Nov 2024 13:29:10 +0800 Subject: [PATCH] :bug: Fix HTML block pasting https://github.com/siyuan-note/siyuan/issues/12994 --- app/src/protyle/util/paste.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/protyle/util/paste.ts b/app/src/protyle/util/paste.ts index 9b4829021..689a59410 100644 --- a/app/src/protyle/util/paste.ts +++ b/app/src/protyle/util/paste.ts @@ -401,7 +401,7 @@ export const paste = async (protyle: IProtyle, event: (ClipboardEvent | DragEven insertHTML(tempInnerHTML, protyle, isBlock); } } else { - if (tempInnerHTML.indexOf("NodeHTMLBlock")) { + if (-1 < tempInnerHTML.indexOf("NodeHTMLBlock")) { // 复制 HTML 块粘贴出来的不是 HTML 块 https://github.com/siyuan-note/siyuan/issues/12994 tempInnerHTML = Lute.UnEscapeHTMLStr(tempInnerHTML); }