hugo-soresu

My fork of hugo-xmin

git clone git://git.shimmy1996.com/hugo-soresu.git
commit ba3f6260376e53b1849d369622b7092237f8e7db
parent cd81f2bbf5e2d01da58110ae01b583f090acc941
Author: Shimmy Xu <shimmy.xu@shimmy1996.com>
Date:   Tue, 29 May 2018 00:17:00 -0500

Simplify MathJax partial as no LaTeX parsing is needed.

Diffstat:
Mlayouts/partials/mathjax.html | 24+-----------------------
1 file changed, 1 insertion(+), 23 deletions(-)
diff --git a/layouts/partials/mathjax.html b/layouts/partials/mathjax.html
@@ -1,23 +1 @@
-<script type="text/javascript" async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/MathJax.js?config=TeX-MML-AM_CHTML" integrity="sha256-GhM+5JHb6QUzOQPXSJLEWP7R73CbkisjzK5Eyij4U9w=" crossorigin="anonymous"></script>
-<script type="text/javascript">
-(function() {
-  var i, text, code, codes = document.getElementsByTagName('code');
-  for (i = 0; i < codes.length;) {
-    code = codes[i];
-    if (code.parentNode.tagName !== 'PRE' && code.childElementCount === 0) {
-      text = code.textContent;
-      if (/^\$[^$]/.test(text) && /[^$]\$$/.test(text)) {
-        text = text.replace(/^\$/, '\\(').replace(/\$$/, '\\)');
-        code.textContent = text;
-      }
-      if (/^\\\((.|\s)+\\\)$/.test(text) || /^\\\[(.|\s)+\\\]$/.test(text) ||
-          /^\$(.|\s)+\$$/.test(text) ||
-          /^\\begin\{([^}]+)\}(.|\s)+\\end\{[^}]+\}$/.test(text)) {
-        code.outerHTML = code.innerHTML;  // remove <code></code>
-        continue;
-      }
-    }
-    i++;
-  }
-})();
-</script>
+<script async src="https://cdn.jsdelivr.net/npm/mathjax@2.7.4/MathJax.js" integrity="sha256-GhM+5JHb6QUzOQPXSJLEWP7R73CbkisjzK5Eyij4U9w=" crossorigin="anonymous"></script>