From c0bc7a61b6c557803d1ba7755032dc56de4b8588 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Thu, 27 Nov 2025 16:49:52 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/16053 --- app/src/protyle/wysiwyg/input.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/protyle/wysiwyg/input.ts b/app/src/protyle/wysiwyg/input.ts index 8ec43da4a..176892894 100644 --- a/app/src/protyle/wysiwyg/input.ts +++ b/app/src/protyle/wysiwyg/input.ts @@ -167,7 +167,7 @@ export const input = async (protyle: IProtyle, blockElement: HTMLElement, range: // ```test` 不处理,正常渲染为段落块 } else { let replaceInnerHTML = editElement.innerHTML.trim().replace(/^(~|·|`){3,}/g, "```").replace(/\n(~|·|`){3,}/g, "\n```").trim(); - if (!replaceInnerHTML.endsWith("\n```")) { + if (!replaceInnerHTML.endsWith("\n```") && !replaceInnerHTML.endsWith("\n```")) { replaceInnerHTML = replaceInnerHTML.replace("", "") + "\n```"; } editElement.innerHTML = replaceInnerHTML;