From 3babe0a5bb64d25ef09ac5931c2cf163442fa993 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Tue, 16 May 2023 20:23:33 +0800 Subject: [PATCH] :art: https://ld246.com/article/1684031600711 --- app/src/protyle/markdown/highlightRender.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/protyle/markdown/highlightRender.ts b/app/src/protyle/markdown/highlightRender.ts index 8dd1f729b..0f2e78dab 100644 --- a/app/src/protyle/markdown/highlightRender.ts +++ b/app/src/protyle/markdown/highlightRender.ts @@ -73,8 +73,9 @@ export const highlightRender = (element: Element, cdn = Constants.PROTYLE_CDN) = block.style.setProperty("white-space", "pre-wrap"); block.style.setProperty("word-break", "break-all"); } else { - block.style.setProperty("white-space", "pre",); - block.style.setProperty("word-break", "initial",); + // https://ld246.com/article/1684031600711 该属性会导致有 tab 后光标跳至末尾,目前无解 + block.style.setProperty("white-space", "pre"); + block.style.setProperty("word-break", "initial"); } if (ligatures === "true" || (ligatures !== "false" && window.siyuan.config.editor.codeLigatures)) { block.style.fontVariantLigatures = "normal";