summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
Diffstat (limited to 'public')
-rw-r--r--public/js/extra.js6
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