mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-30 21:38:48 +01:00
This commit is contained in:
parent
db60169f1d
commit
c70bf3571f
1 changed files with 6 additions and 5 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue