From 2ad54c516a5c3cd88345b9c0f6e5a720050c935d Mon Sep 17 00:00:00 2001 From: Wu Cheng-Han Date: Tue, 22 Dec 2015 12:09:34 -0600 Subject: Fixed mathjax parser might not render properly --- public/js/extra.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'public/js/extra.js') 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 '' + match[0] + ''; + if (match.index == 0) + return '' + match[0] + ''; + else + return match.input.slice(0, match[0].length); } ); //TOC -- cgit v1.2.3