mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-20 23:36:10 +01:00
This commit is contained in:
parent
29712f6f77
commit
61ee5676c4
10 changed files with 76 additions and 44 deletions
|
|
@ -154,7 +154,7 @@ export const insertHTML = (html: string, protyle: IProtyle, isBlock = false,
|
|||
if (editWbrElement && editableElement && !trimStartText.endsWith("\n")) {
|
||||
// 数学公式后无换行,后期渲染后添加导致 rang 错误,中文输入错误 https://github.com/siyuan-note/siyuan/issues/9054
|
||||
const previousElement = hasPreviousSibling(editWbrElement) as HTMLElement;
|
||||
if (previousElement && previousElement.nodeType !== 3 && previousElement.dataset.type.indexOf("inline-math") > -1 &&
|
||||
if (previousElement && previousElement.nodeType !== 3 && (previousElement.dataset.type || "").indexOf("inline-math") > -1 &&
|
||||
!hasNextSibling(editWbrElement)) {
|
||||
editWbrElement.insertAdjacentText("afterend", "\n");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue