Fixed mathjax parser might not render properly

This commit is contained in:
Wu Cheng-Han 2015-12-22 12:09:34 -06:00
parent 9eb23603f4
commit 2ad54c516a

View file

@ -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