Skip to content

Commit 2ad54c5

Browse files
committed
Fixed mathjax parser might not render properly
1 parent 9eb2360 commit 2ad54c5

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

public/js/extra.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -640,8 +640,10 @@ var mathjaxPlugin = new Plugin(
640640

641641
// this function will be called when something matches
642642
function (match, utils) {
643-
//var code = $(match).text();
644-
return '<span class="mathjax raw">' + match[0] + '</span>';
643+
if (match.index == 0)
644+
return '<span class="mathjax raw">' + match[0] + '</span>';
645+
else
646+
return match.input.slice(0, match[0].length);
645647
}
646648
);
647649
//TOC

0 commit comments

Comments
 (0)