diff options
author | Cheng-Han, Wu | 2016-02-24 10:03:35 +0800 |
---|---|---|
committer | Cheng-Han, Wu | 2016-02-24 10:03:35 +0800 |
commit | 1da0b87714e725dcd540f389b118c581fd93ccb7 (patch) | |
tree | e9b94733dc4cefdbdd0553cf91a4af287eeb0626 /public/js | |
parent | c509abbc395553bc2c09052a715c2339fd4a7a0e (diff) |
Updated and fixed mathjax parsing, now using full featured plugin
Diffstat (limited to 'public/js')
-rw-r--r-- | public/js/extra.js | 15 |
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 |