Commit ad1381fb authored by Huste, Tobias's avatar Huste, Tobias Committed by Erxleben, Fredo
Browse files

Remove compatibility workaround for Mathjax and Kramdown

The underlying issue got fixed as described in https://github.com/gettalong/kramdown/issues/651
parent f6bcfa88
Pipeline #42579 passed with stages
in 5 minutes and 41 seconds
......@@ -2,20 +2,7 @@
---
{% assign mathjax_path = site.directory.vendor | strip | append: "MathJax/" %}
// Acknowledgement, David Eppstein (Oct 17, 2019)
// https://11011110.github.io/blog/2019/10/17/mathjax-3-jekyll.html
document.addEventListener('DOMContentLoaded', function () {
function stripcdata(x) {
if (x.startsWith('% <![CDATA[') && x.endsWith('%]]>'))
return x.substring(11, x.length - 4);
return x;
}
document.querySelectorAll("script[type='math/tex']").forEach(function (el) {
el.outerHTML = "\\(" + stripcdata(el.textContent) + "\\)";
});
document.querySelectorAll("script[type='math/tex; mode=display']").forEach(function (el) {
el.outerHTML = "\\[" + stripcdata(el.textContent) + "\\]";
});
var script = document.createElement('script');
script.src = "{{ mathjax_path | append: 'es5/tex-mml-chtml.js' | relative_url }}";
script.defer = true;
......
Subproject commit c029529e100f07dcbfe46a6e4a682668ee139266
Subproject commit c8292351190ce249f7143f224dbe7a190c8228fe
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment