From 1da0b87714e725dcd540f389b118c581fd93ccb7 Mon Sep 17 00:00:00 2001 From: Cheng-Han, Wu Date: Wed, 24 Feb 2016 10:03:35 +0800 Subject: Updated and fixed mathjax parsing, now using full featured plugin --- public/js/extra.js | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'public/js/extra.js') 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 '' + match[0] + ''; - 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 -- cgit v1.2.3