From 59b4323c4ce779e5842c550933f26d477e171814 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Tue, 24 Dec 2024 20:48:30 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/13590 --- app/src/protyle/wysiwyg/input.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/src/protyle/wysiwyg/input.ts b/app/src/protyle/wysiwyg/input.ts index 7c6187e85..2c261d68d 100644 --- a/app/src/protyle/wysiwyg/input.ts +++ b/app/src/protyle/wysiwyg/input.ts @@ -113,11 +113,14 @@ export const input = async (protyle: IProtyle, blockElement: HTMLElement, range: return; } // https://github.com/siyuan-note/siyuan/issues/9015 - if (type !== "NodeHeading" && - (editElement.innerHTML.startsWith("¥¥") || editElement.innerHTML.startsWith("¥¥") || - trimStartText.indexOf("\n¥¥") > -1 || trimStartText.indexOf("\n¥¥") > -1)) { + if (type === "NodeParagraph" && ( + editElement.innerHTML.startsWith("¥¥") || editElement.innerHTML.startsWith("¥¥") || + // https://ld246.com/article/1730020516427 + trimStartText.indexOf("\n¥¥") > -1 || trimStartText.indexOf("\n¥¥") > -1 + )) { editElement.innerHTML = editElement.innerHTML.replace("¥¥", "$$$$").replace("¥¥", "$$$$"); } + const refElement = hasClosestByAttribute(range.startContainer, "data-type", "block-ref"); if (refElement && refElement.getAttribute("data-subtype") === "d") { const response = await fetchSyncPost("/api/block/getRefText", {id: refElement.getAttribute("data-id")});