mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-18 18:10:43 +08:00
This commit is contained in:
parent
f2f97a96be
commit
673114dac6
@ -151,7 +151,7 @@ const listEnter = (protyle: IProtyle, blockElement: HTMLElement, range: Range) =
|
||||
selectNode.firstChild.remove();
|
||||
}
|
||||
// https://github.com/siyuan-note/siyuan/issues/3850
|
||||
if (editableElement?.lastElementChild?.getAttribute("data-type").indexOf("inline-math") > -1 &&
|
||||
if ((editableElement?.lastElementChild?.getAttribute("data-type") || "").indexOf("inline-math") > -1 &&
|
||||
!hasNextSibling(editableElement?.lastElementChild)) {
|
||||
editableElement.insertAdjacentText("beforeend", "\n");
|
||||
}
|
||||
@ -363,7 +363,7 @@ export const enter = (blockElement: HTMLElement, range: Range, protyle: IProtyle
|
||||
selectNode.firstChild.remove();
|
||||
}
|
||||
// https://github.com/siyuan-note/siyuan/issues/3850
|
||||
if (editableElement?.lastElementChild?.getAttribute("data-type").indexOf("inline-math") > -1 &&
|
||||
if ((editableElement?.lastElementChild?.getAttribute("data-type") || "").indexOf("inline-math") > -1 &&
|
||||
!hasNextSibling(editableElement?.lastElementChild)) {
|
||||
editableElement.insertAdjacentText("beforeend", "\n");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user