summaryrefslogtreecommitdiff
path: root/public/js
diff options
context:
space:
mode:
authorYukai Huang2016-10-12 14:37:32 +0800
committerYukai Huang2016-10-12 14:37:32 +0800
commit895bf98b03483ba1441584c48b580eca3e44576b (patch)
treed1c9a76dbdef29a2afc490f684f0c5b079e76330 /public/js
parentb73fcfc5c94d6265306ec13d2694998744bcea4b (diff)
Load custom markdown-it-regex plugin with script-loader
Diffstat (limited to '')
-rw-r--r--public/js/extra.js32
1 files changed, 16 insertions, 16 deletions
diff --git a/public/js/extra.js b/public/js/extra.js
index bf44e6d0..af43c2b2 100644
--- a/public/js/extra.js
+++ b/public/js/extra.js
@@ -306,21 +306,21 @@ function finishView(view) {
}
});
//graphviz
- var graphvizs = view.find(".graphviz.raw").removeClass("raw");
- graphvizs.each(function (key, value) {
- try {
- var $value = $(value);
- var $ele = $(value).parent().parent();
-
- var graphviz = Viz($value.text());
- $value.html(graphviz);
-
- $ele.addClass('graphviz');
- $value.children().unwrap().unwrap();
- } catch (err) {
- console.warn(err);
- }
- });
+ var graphvizs = view.find(".graphviz.raw").removeClass("raw");
+ graphvizs.each(function (key, value) {
+ try {
+ var $value = $(value);
+ var $ele = $(value).parent().parent();
+
+ var graphviz = Viz($value.text());
+ $value.html(graphviz);
+
+ $ele.addClass('graphviz');
+ $value.children().unwrap().unwrap();
+ } catch (err) {
+ console.warn(err);
+ }
+ });
//mermaid
var mermaids = view.find(".mermaid.raw").removeClass("raw");
@@ -916,7 +916,7 @@ md.renderer.rules.fence = function (tokens, idx, options, env, self) {
};
/* Defined regex markdown it plugins */
-var Plugin = require('markdown-it-regexp');
+require('script!../vendor/markdown-it-regexp');
//youtube
var youtubePlugin = new Plugin(