Support YAML meta disable mathjax
This commit is contained in:
parent
109d9881d9
commit
c43f9784b4
1 changed files with 6 additions and 0 deletions
6
public/vendor/markdown-it-mathjax.js
vendored
6
public/vendor/markdown-it-mathjax.js
vendored
|
@ -8,6 +8,9 @@
|
||||||
}
|
}
|
||||||
})(this, function() {
|
})(this, function() {
|
||||||
function math(state, silent) {
|
function math(state, silent) {
|
||||||
|
if (state.md.meta.mathjax === false) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
var startMathPos = state.pos
|
var startMathPos = state.pos
|
||||||
if (state.src.charCodeAt(startMathPos) !== 0x5C /* \ */) {
|
if (state.src.charCodeAt(startMathPos) !== 0x5C /* \ */) {
|
||||||
return false
|
return false
|
||||||
|
@ -47,6 +50,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function texMath(state, silent) {
|
function texMath(state, silent) {
|
||||||
|
if (state.md.meta.mathjax === false) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
var startMathPos = state.pos
|
var startMathPos = state.pos
|
||||||
if (state.src.charCodeAt(startMathPos) !== 0x24 /* $ */) {
|
if (state.src.charCodeAt(startMathPos) !== 0x24 /* $ */) {
|
||||||
return false
|
return false
|
||||||
|
|
Loading…
Reference in a new issue