mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
This commit is contained in:
parent
a74ee348f7
commit
f8412a49c4
1 changed files with 5 additions and 3 deletions
|
|
@ -50,7 +50,7 @@ export const input = async (protyle: IProtyle, blockElement: HTMLElement, range:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (turnIntoTaskList(protyle, type, blockElement, editElement, range)) {
|
if (turnIntoTaskList(protyle, type, blockElement, editElement, range)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (headingTurnIntoList(protyle, type, blockElement, editElement, range)) {
|
if (headingTurnIntoList(protyle, type, blockElement, editElement, range)) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -101,8 +101,10 @@ export const input = async (protyle: IProtyle, blockElement: HTMLElement, range:
|
||||||
html += genEmptyBlock(false, true);
|
html += genEmptyBlock(false, true);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (trimStartText.startsWith("```") || trimStartText.startsWith("~~~") || trimStartText.startsWith("···") ||
|
if (type !== "NodeCodeBlock" && (
|
||||||
trimStartText.indexOf("\n```") > -1 || trimStartText.indexOf("\n~~~") > -1 || trimStartText.indexOf("\n···") > -1) {
|
trimStartText.startsWith("```") || trimStartText.startsWith("~~~") || trimStartText.startsWith("···") ||
|
||||||
|
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) {
|
if (trimStartText.indexOf("\n") === -1 && trimStartText.replace(/·|~/g, "`").replace(/^`{3,}/g, "").indexOf("`") > -1) {
|
||||||
// ```test` 不处理,正常渲染为段落块
|
// ```test` 不处理,正常渲染为段落块
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue