mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-15 03:28:07 +01:00
🚨
This commit is contained in:
parent
a03dda30ea
commit
20270f67e9
6 changed files with 9 additions and 9 deletions
|
|
@ -150,10 +150,10 @@ export const insertHTML = (html: string, protyle: IProtyle, isBlock = false,
|
|||
editableElement.innerHTML = replaceInnerHTML;
|
||||
}
|
||||
}
|
||||
const editWbrElement = editableElement.querySelector("wbr")
|
||||
const editWbrElement = editableElement.querySelector("wbr");
|
||||
if (editWbrElement && editableElement && !trimStartText.endsWith("\n")) {
|
||||
// 数学公式后无换行,后期渲染后添加导致 rang 错误,中文输入错误 https://github.com/siyuan-note/siyuan/issues/9054
|
||||
const previousElement = hasPreviousSibling(editWbrElement) as HTMLElement
|
||||
const previousElement = hasPreviousSibling(editWbrElement) as HTMLElement;
|
||||
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