diff options
author | Wu Cheng-Han | 2015-12-22 12:09:34 -0600 |
---|---|---|
committer | Wu Cheng-Han | 2015-12-22 12:09:34 -0600 |
commit | 2ad54c516a5c3cd88345b9c0f6e5a720050c935d (patch) | |
tree | 02512ab5f07b7d76ff72f3ee92f8a26f46c1bbaa /public | |
parent | 9eb23603f4d30a0822afde7fbd234976557f575a (diff) |
Fixed mathjax parser might not render properly
Diffstat (limited to '')
-rw-r--r-- | public/js/extra.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/public/js/extra.js b/public/js/extra.js index 12342f09..5eb1f28a 100644 --- a/public/js/extra.js +++ b/public/js/extra.js @@ -640,8 +640,10 @@ var mathjaxPlugin = new Plugin( // this function will be called when something matches function (match, utils) { - //var code = $(match).text(); - return '<span class="mathjax raw">' + match[0] + '</span>'; + if (match.index == 0) + return '<span class="mathjax raw">' + match[0] + '</span>'; + else + return match.input.slice(0, match[0].length); } ); //TOC |