aboutsummaryrefslogtreecommitdiff
path: root/node_modules/markdown-it-anchor/runkit.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/markdown-it-anchor/runkit.js')
-rw-r--r--node_modules/markdown-it-anchor/runkit.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/node_modules/markdown-it-anchor/runkit.js b/node_modules/markdown-it-anchor/runkit.js
new file mode 100644
index 00000000..df7624e1
--- /dev/null
+++ b/node_modules/markdown-it-anchor/runkit.js
@@ -0,0 +1,22 @@
+const md = require('markdown-it')()
+const anchor = require('markdown-it-anchor')
+
+md.use(anchor, {
+ level: 1,
+ // slugify: string => string,
+ permalink: false,
+ // renderPermalink: (slug, opts, state, permalink) => {},
+ permalinkClass: 'header-anchor',
+ permalinkSymbol: 'ΒΆ',
+ permalinkBefore: false
+})
+
+const src = `# First header
+
+Lorem ipsum.
+
+## Next section!
+
+This is totaly awesome.`
+
+console.log(md.render(src))