Skip to content

Commit c43f978

Browse files
committed
Support YAML meta disable mathjax
1 parent 109d988 commit c43f978

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

public/vendor/markdown-it-mathjax.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
}
99
})(this, function() {
1010
function math(state, silent) {
11+
if (state.md.meta.mathjax === false) {
12+
return false
13+
}
1114
var startMathPos = state.pos
1215
if (state.src.charCodeAt(startMathPos) !== 0x5C /* \ */) {
1316
return false
@@ -47,6 +50,9 @@
4750
}
4851

4952
function texMath(state, silent) {
53+
if (state.md.meta.mathjax === false) {
54+
return false
55+
}
5056
var startMathPos = state.pos
5157
if (state.src.charCodeAt(startMathPos) !== 0x24 /* $ */) {
5258
return false

0 commit comments

Comments
 (0)