fix(sidebar): duplicate equations rendering

This commit is contained in:
Elian Doran
2026-04-11 14:14:18 +03:00
parent 2b63af82ec
commit 67a48bbec7

View File

@@ -1450,6 +1450,9 @@ export function useMathRendering(containerRef: RefObject<HTMLElement>, deps: unk
const mathElements = containerRef.current.querySelectorAll(".math-tex");
for (const mathEl of mathElements) {
// Skip if already rendered by KaTeX
if (mathEl.querySelector(".katex")) continue;
try {
math.render(mathEl.textContent || "", mathEl as HTMLElement);
} catch (e) {