mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-04 07:48:49 +01:00
This commit is contained in:
parent
754b3ad67a
commit
be187c706c
1 changed files with 1 additions and 1 deletions
|
|
@ -233,7 +233,7 @@ export const enter = (blockElement: HTMLElement, range: Range, protyle: IProtyle
|
|||
trimStartText.indexOf("\n```") > -1 || trimStartText.indexOf("\n~~~") > -1 || trimStartText.indexOf("\n···") > -1) {
|
||||
if (trimStartText.indexOf("\n") === -1 && trimStartText.replace(/·|~/g, "`").replace(/^`{3,}/g, "").indexOf("`") > -1) {
|
||||
// ```test` 不处理,正常渲染为段落块
|
||||
} else {
|
||||
} else if (blockElement.classList.contains("p")) { // https://github.com/siyuan-note/siyuan/issues/6953
|
||||
const oldHTML = blockElement.outerHTML;
|
||||
let replaceInnerHTML = editableElement.innerHTML.replace(/^(~|·|`){3,}/g, "```").replace(/\n(~|·|`){3,}/g, "\n```").trim();
|
||||
if (!replaceInnerHTML.endsWith("\n```")) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue