diff --git a/app/src/protyle/wysiwyg/input.ts b/app/src/protyle/wysiwyg/input.ts index e589c54a8..410a540f6 100644 --- a/app/src/protyle/wysiwyg/input.ts +++ b/app/src/protyle/wysiwyg/input.ts @@ -59,7 +59,7 @@ export const input = async (protyle: IProtyle, blockElement: HTMLElement, range: blockElement.setAttribute("updated", dayjs().format("YYYYMMDDHHmmss")); if (editElement.innerHTML === "》" || editElement.innerHTML.indexOf("\n》") > -1) { - editElement.innerHTML = editElement.innerHTML.replace("》",">"); + editElement.innerHTML = editElement.innerHTML.replace("》", ">"); } const trimStartText = editElement.innerHTML.trimStart(); if ((trimStartText.startsWith("````") || trimStartText.startsWith("····") || trimStartText.startsWith("~~~~")) && @@ -99,7 +99,9 @@ export const input = async (protyle: IProtyle, blockElement: HTMLElement, range: if (blockElement.parentElement.classList.contains("li") && blockElement.parentElement.childElementCount === 3 // https://ld246.com/article/1659315815506 ) { - if (blockElement.parentElement.parentElement.childElementCount === 2) { + // 仅有一项的列表才可转换 + if (!blockElement.parentElement.parentElement.classList.contains("protyle-wysiwyg") && // https://ld246.com/article/1659315815506 + blockElement.parentElement.parentElement.childElementCount === 2) { html = `
`; id = blockElement.parentElement.parentElement.getAttribute("data-node-id"); blockElement = blockElement.parentElement.parentElement;