summaryrefslogtreecommitdiff
path: root/public/js
diff options
context:
space:
mode:
authorCheng-Han, Wu2016-02-24 10:03:35 +0800
committerCheng-Han, Wu2016-02-24 10:03:35 +0800
commit1da0b87714e725dcd540f389b118c581fd93ccb7 (patch)
treee9b94733dc4cefdbdd0553cf91a4af287eeb0626 /public/js
parentc509abbc395553bc2c09052a715c2339fd4a7a0e (diff)
Updated and fixed mathjax parsing, now using full featured plugin
Diffstat (limited to 'public/js')
-rw-r--r--public/js/extra.js15
1 files changed, 1 insertions, 14 deletions
diff --git a/public/js/extra.js b/public/js/extra.js
index 90b9a70c..ce00d0e3 100644
--- a/public/js/extra.js
+++ b/public/js/extra.js
@@ -677,6 +677,7 @@ md.use(window.markdownitMark);
md.use(window.markdownitIns);
md.use(window.markdownitSub);
md.use(window.markdownitSup);
+md.use(window.markdownitMathjax);
md.renderer.rules.image = function (tokens, idx, options, env, self) {
tokens[idx].attrJoin('class', 'raw');
@@ -768,19 +769,6 @@ var gistPlugin = new Plugin(
return code;
}
);
-//mathjax
-var mathjaxPlugin = new Plugin(
- // regexp to match
- /^\$\$\n([\d\D]*?)\n\$\$$|\$([\d\D]*?)\$/,
-
- // this function will be called when something matches
- function (match, utils) {
- if (match.index == 0 && (md.meta.mathjax || typeof md.meta.mathjax == "undefined"))
- return '<span class="mathjax raw">' + match[0] + '</span>';
- else
- return match.input.slice(0, match[0].length);
- }
-);
//TOC
var tocPlugin = new Plugin(
// regexp to match
@@ -863,7 +851,6 @@ md.use(metaPlugin);
md.use(youtubePlugin);
md.use(vimeoPlugin);
md.use(gistPlugin);
-md.use(mathjaxPlugin);
md.use(tocPlugin);
md.use(slidesharePlugin);
md.use(speakerdeckPlugin); \ No newline at end of file