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

This commit is contained in:
Hasenpfote authored and GitHub committed 2025-01-19 16:11:51 +08:00
1 parent 18cc3e0d4f
commit 8287e42e6e
2 files changed
+19 -1

No files matched your search

+10 -1
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() {