aboutsummaryrefslogtreecommitdiff
path: root/node_modules/markdown-it-anchor/runkit.js
blob: df7624e17d3ad3fc0beae49c198e8d7776c5c24e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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))