This commit is contained in:
Daniel 2024-12-19 22:09:42 +08:00
parent ea98ecb3b6
commit 93a3915f0c
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -395,6 +395,9 @@ export const paste = async (protyle: IProtyle, event: (ClipboardEvent | DragEven
const range = getEditorRange(protyle.wysiwyg.element);
if (nodeElement.getAttribute("data-type") === "NodeCodeBlock" ||
protyle.toolbar.getCurrentType(range).includes("code")) {
// https://github.com/siyuan-note/siyuan/issues/13552
textPlain = textPlain.replace(/\u200D```/g, "```");
textPlain = textPlain.replace(/```/g, "\u200D```");
insertHTML(textPlain, protyle);
return;
} else if (siyuanHTML) {