An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:bug: fix https://github.com/siyuan-note/siyuan/issues/8994
Vanessa66e79a1c0f9c
diff --git a/app/src/protyle/wysiwyg/list.ts b/app/src/protyle/wysiwyg/list.tsindex 12decd2668..f142d776bd 100644--- a/app/src/protyle/wysiwyg/list.ts+++ b/app/src/protyle/wysiwyg/list.ts@@ -285,6 +285,11 @@ export const listOutdent = (protyle: IProtyle, liItemElements: Element[], range:return;}const parentLiItemElement = liElement.parentElement;+ const parentParentElement = parentLiItemElement.parentElement;+ if (liElement.previousElementSibling?.classList.contains("protyle-action") && !parentParentElement.getAttribute("data-node-id")) {+ // https://ld246.com/article/1691981936960 情况下 zoom in 列表项+ return;+ }if (parentLiItemElement.classList.contains("protyle-wysiwyg") || parentLiItemElement.classList.contains("sb") || parentLiItemElement.classList.contains("bq")) {// 顶层列表const doOperations: IOperation[] = [];@@ -613,7 +618,20 @@ export const listOutdent = (protyle: IProtyle, liItemElements: Element[], range:});}}- if (liElement.childElementCount === 1) {+ if (liElement.childElementCount === 1 && parentLiItemElement.childElementCount === 3) {+ // https://ld246.com/article/1691981936960+ doOperations.push({+ action: "delete",+ id: parentLiItemElement.getAttribute("data-node-id")+ });+ undoOperations.splice(0, 0, {+ action: "insert",+ id: parentLiItemElement.getAttribute("data-node-id"),+ data: parentLiItemElement.outerHTML,+ previousID: parentLiItemElement.previousElementSibling.getAttribute("data-node-id")+ });+ parentLiItemElement.remove();+ } else if (liElement.childElementCount === 1) {doOperations.push({action: "delete",id: liElement.getAttribute("data-node-id")@@ -638,13 +656,13 @@ export const listOutdent = (protyle: IProtyle, liItemElements: Element[], range:id: liElement.getAttribute("data-node-id"),});}- if (parentLiItemElement.parentElement.classList.contains("protyle-wysiwyg")) {+ if (parentParentElement.classList.contains("protyle-wysiwyg")) {transaction(protyle, doOperations, undoOperations);} else {- if (parentLiItemElement.getAttribute("data-subtype") === "o") {- updateListOrder(parentLiItemElement.parentElement);+ if (parentLiItemElement && parentLiItemElement.getAttribute("data-subtype") === "o") {+ updateListOrder(parentParentElement);}- updateTransaction(protyle, parentLiItemElement.parentElement.getAttribute("data-node-id"), parentLiItemElement.parentElement.outerHTML, html);+ updateTransaction(protyle, parentParentElement.getAttribute("data-node-id"), parentParentElement.outerHTML, html);}- focusByWbr(parentLiItemElement.parentElement, range);+ focusByWbr(parentParentElement, range);};