mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 14:40:12 +01:00
This commit is contained in:
parent
304016589d
commit
c0bc7a61b6
1 changed files with 1 additions and 1 deletions
|
|
@ -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```<wbr>")) {
|
||||
replaceInnerHTML = replaceInnerHTML.replace("<wbr>", "") + "<wbr>\n```";
|
||||
}
|
||||
editElement.innerHTML = replaceInnerHTML;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue