Load markdown-it-container draft tip

Sun, 06 Aug 2023 21:12:43 +0300

author
Tuomo Valkonen <tuomov@iki.fi>
date
Sun, 06 Aug 2023 21:12:43 +0300
changeset 43
20606bf1a6a0
parent 42
260f867d46c0

Load markdown-it-container

markdown_it.js file | annotate | diff | comparison | revisions
package.json file | annotate | diff | comparison | revisions
--- a/markdown_it.js	Sun Aug 06 14:32:25 2023 +0300
+++ b/markdown_it.js	Sun Aug 06 21:12:43 2023 +0300
@@ -66,7 +66,13 @@
         var mm = require('markdown-it-mark');
         var mr = require('markdown-it-replace-link');
         var mc = require('markdown-it-checkbox');
-        md.use(mk, katexOptions).use(mm).use(mr).use(mc);
+        var mcc = require('markdown-it-container');
+        md.use(mk, katexOptions)
+          .use(mm)
+          .use(mr)
+          .use(mc)
+          .use(mcc, 'NOTE')
+          .use(mcc, 'IMPORTANT');
         output = md.render(input);
     } catch(e) {
         console.error(e.stack || e.message || String(e));
--- a/package.json	Sun Aug 06 14:32:25 2023 +0300
+++ b/package.json	Sun Aug 06 21:12:43 2023 +0300
@@ -15,10 +15,10 @@
     "highlight.js": "^10.1.1",
     "markdown-it": "^11.0.0",
     "markdown-it-checkbox": "^1.1.0",
+    "markdown-it-container": "^3.0.0",
     "markdown-it-mark": "^3.0.0",
     "markdown-it-replace-link": "^1.1.0"
   },
-  "devDependencies": {},
   "scripts": {
     "test": "echo \"Error: no test specified\" && exit 1"
   },

mercurial