diff --git a/app/src/protyle/util/resize.ts b/app/src/protyle/util/resize.ts index ccef5e2c9..771469c26 100644 --- a/app/src/protyle/util/resize.ts +++ b/app/src/protyle/util/resize.ts @@ -54,12 +54,13 @@ export const resize = (protyle: IProtyle) => { } }); } - protyle.wysiwyg.element.querySelectorAll(".code-block .protyle-linenumber__rows").forEach((item: HTMLElement) => { - if ((item.nextElementSibling as HTMLElement).style.wordBreak === "break-word") { - lineNumberRender(item.parentElement); - } - }); } + // 小于 MIN_ABS 也会导致换行 https://github.com/siyuan-note/siyuan/issues/13677 + protyle.wysiwyg.element.querySelectorAll(".code-block .protyle-linenumber__rows").forEach((item: HTMLElement) => { + if ((item.nextElementSibling as HTMLElement).style.wordBreak === "break-word") { + lineNumberRender(item.parentElement); + } + }); const topElement = protyle.wysiwyg.element.querySelector("[data-resize-top]"); if (topElement) { topElement.scrollIntoView();