mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-20 19:10:49 +08:00
This commit is contained in:
parent
db60169f1d
commit
c70bf3571f
@ -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…
Reference in New Issue
Block a user