From f338c4016adcd80845457e3e9ea621dd23d99944 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sun, 28 Aug 2022 21:29:35 +0800 Subject: [PATCH] :bug: fix https://github.com/siyuan-note/siyuan/issues/5741 --- app/src/protyle/wysiwyg/input.ts | 4 ++-- app/src/protyle/wysiwyg/list.ts | 4 ++-- app/src/protyle/wysiwyg/transaction.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/protyle/wysiwyg/input.ts b/app/src/protyle/wysiwyg/input.ts index dafa3a6af..697fc54f5 100644 --- a/app/src/protyle/wysiwyg/input.ts +++ b/app/src/protyle/wysiwyg/input.ts @@ -100,13 +100,13 @@ export const input = async (protyle: IProtyle, blockElement: HTMLElement, range: blockElement.parentElement.childElementCount === 3 // https://ld246.com/article/1659315815506 ) { if (blockElement.parentElement.parentElement.childElementCount === 2) { - html = `
`; + html = `
`; id = blockElement.parentElement.parentElement.getAttribute("data-node-id"); blockElement = blockElement.parentElement.parentElement; todoOldHTML = blockElement.outerHTML; } } else { - html = `
`; + html = `
`; todoOldHTML = blockElement.outerHTML; } } else { diff --git a/app/src/protyle/wysiwyg/list.ts b/app/src/protyle/wysiwyg/list.ts index d036b2df7..780fe3a55 100644 --- a/app/src/protyle/wysiwyg/list.ts +++ b/app/src/protyle/wysiwyg/list.ts @@ -34,7 +34,7 @@ export const genListItemElement = (listItemElement: Element, offset = 0, wbr = f const index = parseInt(listItemElement.getAttribute("data-marker")) + offset; element.innerHTML = `
${index + 1}.
${genEmptyBlock(false, wbr)}
`; } else if (type === "t") { - element.innerHTML = `
${genEmptyBlock(false, wbr)}
`; + element.innerHTML = `
${genEmptyBlock(false, wbr)}
`; } else { element.innerHTML = `
${genEmptyBlock(false, wbr)}
`; } @@ -436,7 +436,7 @@ export const listOutdent = (protyle: IProtyle, liItemElements: Element[], range: id: itemId, data: item.outerHTML }); - item.querySelector(".protyle-action").outerHTML = '
'; + item.querySelector(".protyle-action").outerHTML = '
'; item.setAttribute("data-subtype", "t"); item.setAttribute("data-marker", "*"); doOperations.push({ diff --git a/app/src/protyle/wysiwyg/transaction.ts b/app/src/protyle/wysiwyg/transaction.ts index dab513f04..fba948555 100644 --- a/app/src/protyle/wysiwyg/transaction.ts +++ b/app/src/protyle/wysiwyg/transaction.ts @@ -499,7 +499,7 @@ export const turnsIntoTransaction = (options: { protyle: IProtyle, selectsElemen } else if (options.type === "Blocks2OLs") { html += `
${index + 1}.
`; } else { - html += `
`; + html += `
`; } }); parentElement.innerHTML = html + '
';