From 53bd194e217f0c3af40780016f33a0b9a8ef0372 Mon Sep 17 00:00:00 2001 From: facelessuser Date: Sat, 9 Jun 2018 12:30:03 -0600 Subject: [PATCH] Non need to scan for begin/end --- js/katex_config.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/js/katex_config.js b/js/katex_config.js index be1e77cb..bff9deac 100644 --- a/js/katex_config.js +++ b/js/katex_config.js @@ -3,7 +3,6 @@ var katexMath = (function () { var maths = document.querySelectorAll('.arithmatex'), - block_env = /\\begin\{([a-z]+\*?)\}.+?\\end\{\1\}/, tex; for (var i = 0; i < maths.length; i++) { @@ -12,8 +11,7 @@ var katexMath = (function () { (tex.startsWith('$') && tex.endsWith('$'))) { katex.render(tex.slice(2, -2), maths[i], {'displayMode': false}); } else if ((tex.startsWith('\\[') && tex.endsWith('\\]')) || - (tex.startsWith('$$') && tex.endsWith('$$')) || - block_env.test(tex)) { + (tex.startsWith('$$') && tex.endsWith('$$'))) { katex.render(tex.slice(2, -2), maths[i], {'displayMode': true}); } }