fix: display of long equations is cut off (#287)

This commit is contained in:
Hasenpfote
2025-01-19 17:11:51 +09:00
committed by GitHub
parent 18cc3e0d4f
commit 8287e42e6e
2 changed files with 19 additions and 1 deletions

View File

@@ -305,7 +305,8 @@ function initCustomScrollbar() {
autoHideSuspend: false,
},
});
document.querySelectorAll('pre').forEach((ele) => {
const preElements = document.querySelectorAll('pre');
preElements.forEach((ele) => {
OverlayScrollbars(ele, {
scrollbars: {
theme: 'scrollbar-base scrollbar-dark px-2',
@@ -315,6 +316,14 @@ function initCustomScrollbar() {
}
});
});
const katexElements = document.querySelectorAll('.katex-display') as NodeListOf<HTMLElement>;
katexElements.forEach((ele) => {
OverlayScrollbars(ele, {
scrollbars: {
theme: 'scrollbar-base scrollbar-auto py-1',
}
});
});
}
function showBanner() {