From 1e03cef9071b346e6edab5334f166c7e19a4eec3 Mon Sep 17 00:00:00 2001 From: Sina Atalay Date: Sat, 24 Feb 2024 16:15:44 +0100 Subject: [PATCH] docs: fix KaTeX instant loading --- docs/assets/javascripts/katex.js | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/docs/assets/javascripts/katex.js b/docs/assets/javascripts/katex.js index 8debf9f..baabe41 100644 --- a/docs/assets/javascripts/katex.js +++ b/docs/assets/javascripts/katex.js @@ -1,11 +1,10 @@ -document$.subscribe(({ body }) => { - renderMathInElement(body, { - delimiters: [ - { left: "$$", right: "$$", display: true }, - { left: "$", right: "$", display: false }, - { left: "\\(", right: "\\)", display: false }, - { left: "\\[", right: "\\]", display: true } - ], - }) +document$.subscribe(() => { + renderMathInElement(document.body, { + delimiters: [ + { left: "$$", right: "$$", display: true }, + { left: "$", right: "$", display: false }, + { left: "\\(", right: "\\)", display: false }, + { left: "\\[", right: "\\]", display: true } + ], }) - \ No newline at end of file +}) \ No newline at end of file