Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: fix https://github.com/siyuan-note/siyuan/issues/8918

Vanessac01ba53c9be4
diff --git a/app/src/protyle/wysiwyg/enter.ts b/app/src/protyle/wysiwyg/enter.ts
index 7336f4f129..88ce42fe1a 100644
--- a/app/src/protyle/wysiwyg/enter.ts
+++ b/app/src/protyle/wysiwyg/enter.ts
@@ -42,7 +42,11 @@ const listEnter = (protyle: IProtyle, blockElement: HTMLElement, range: Range) =
if (listItemElement.parentElement.classList.contains("protyle-wysiwyg")) {
return true;
}
+ // https://github.com/siyuan-note/siyuan/issues/8935
+ const wbrElement = document.createElement("wbr")
+ range.insertNode(wbrElement)
const html = listItemElement.parentElement.outerHTML;
+ wbrElement.remove();
let newElement = genListItemElement(listItemElement, -1, true);
if (!blockElement.previousElementSibling.classList.contains("protyle-action")) {
// 列表项中有多个块,最后一个块为空,换行应进行缩进