From b2958f9f37b8730a9f089814c39660b8af5ac7cb Mon Sep 17 00:00:00 2001 From: Vanessa Date: Wed, 29 Mar 2023 11:09:28 +0800 Subject: [PATCH] :art: fix https://github.com/siyuan-note/siyuan/issues/7812 --- app/src/protyle/hint/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/protyle/hint/index.ts b/app/src/protyle/hint/index.ts index f1cfee9a7..db371bdbb 100644 --- a/app/src/protyle/hint/index.ts +++ b/app/src/protyle/hint/index.ts @@ -412,7 +412,9 @@ ${unicode2Emoji(emoji.unicode, true)}`; // 前后有标记符的情况 https://github.com/siyuan-note/siyuan/issues/2511 const endSplit = Constants.BLOCK_HINT_CLOSE_KEYS[this.splitChar]; if (Constants.BLOCK_HINT_KEYS.includes(this.splitChar) && endSplit && range.startContainer.nodeType === 3 - && (range.startContainer as Text).wholeText.indexOf(endSplit) > -1) { + && (range.startContainer as Text).wholeText.indexOf(endSplit) > -1 + // 在包含 )) 的块中引用时会丢失字符 https://ld246.com/article/1679980200782 + && (range.startContainer as Text).wholeText.indexOf(this.splitChar) > -1) { let matchEndChar = 0; let textNode = range.startContainer; while (textNode && matchEndChar < 2) {