From c43f9784b4e0ed7299a215f0e3f1e4fce296780f Mon Sep 17 00:00:00 2001 From: "Cheng-Han, Wu" Date: Fri, 4 Mar 2016 23:20:55 +0800 Subject: [PATCH] Support YAML meta disable mathjax --- public/vendor/markdown-it-mathjax.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/public/vendor/markdown-it-mathjax.js b/public/vendor/markdown-it-mathjax.js index 01c6fa4..299e483 100644 --- a/public/vendor/markdown-it-mathjax.js +++ b/public/vendor/markdown-it-mathjax.js @@ -8,6 +8,9 @@ } })(this, function() { function math(state, silent) { + if (state.md.meta.mathjax === false) { + return false + } var startMathPos = state.pos if (state.src.charCodeAt(startMathPos) !== 0x5C /* \ */) { return false @@ -47,6 +50,9 @@ } function texMath(state, silent) { + if (state.md.meta.mathjax === false) { + return false + } var startMathPos = state.pos if (state.src.charCodeAt(startMathPos) !== 0x24 /* $ */) { return false