From dbb5bcccb1b25c9d4e12b69a13376db5385efc25 Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Thu, 19 Dec 2024 22:20:13 +0800 Subject: [PATCH] :art: Improve Markdown code block parsing https://github.com/siyuan-note/siyuan/issues/13552 --- app/src/protyle/util/paste.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/protyle/util/paste.ts b/app/src/protyle/util/paste.ts index 37309c5e9..09cca230a 100644 --- a/app/src/protyle/util/paste.ts +++ b/app/src/protyle/util/paste.ts @@ -438,6 +438,10 @@ export const paste = async (protyle: IProtyle, event: (ClipboardEvent | DragEven // 复制 HTML 块粘贴出来的不是 HTML 块 https://github.com/siyuan-note/siyuan/issues/12994 tempInnerHTML = Lute.UnEscapeHTMLStr(tempInnerHTML); } + + // https://github.com/siyuan-note/siyuan/issues/13552 + tempInnerHTML = tempInnerHTML.replace(/\u200D```/g, "```"); + insertHTML(tempInnerHTML, protyle, isBlock, false, true); } filterClipboardHint(protyle, protyle.lute.BlockDOM2StdMd(tempInnerHTML));