mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 15:10:12 +01:00
This commit is contained in:
parent
e354fcd39c
commit
fdd9973d24
1 changed files with 3 additions and 1 deletions
|
|
@ -72,7 +72,9 @@ const listEnter = (protyle: IProtyle, blockElement: HTMLElement, range: Range) =
|
||||||
// 子列表下的段落块回车 https://ld246.com/article/1623919354587
|
// 子列表下的段落块回车 https://ld246.com/article/1623919354587
|
||||||
blockElement.nextElementSibling.isSameNode(subListElement)) {
|
blockElement.nextElementSibling.isSameNode(subListElement)) {
|
||||||
// 含有子列表的换行
|
// 含有子列表的换行
|
||||||
if (position.end >= editableElement.textContent.length) {
|
if (position.end >= editableElement.textContent.length -
|
||||||
|
// 数学公式结尾会有 zwsp https://github.com/siyuan-note/siyuan/issues/6679
|
||||||
|
(editableElement.textContent.endsWith(Constants.ZWSP) ? 1 : 0)) {
|
||||||
// 段末换行,在子列表中插入
|
// 段末换行,在子列表中插入
|
||||||
range.insertNode(document.createElement("wbr"));
|
range.insertNode(document.createElement("wbr"));
|
||||||
const html = subListElement.outerHTML;
|
const html = subListElement.outerHTML;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue