UNPKG

markdown-it-toc-done-right

Version:

Table of contents (TOC) for markdown-it markdown parser with focus on semantic and security.

13 lines (11 loc) 421 B
const uslug = require('uslug') function uslugify (x) { return uslug(x) } const umd = require('markdown-it')({ html: false, xhtmlOut: true, typographer: true }).use(require('markdown-it-anchor'), { permalink: true, permalinkBefore: true, permalinkSymbol: '§', slugify: uslugify }) .use(require('markdown-it-toc-done-right'), { slugify: uslugify }) console.log(umd.render('${toc}\n\n# こんにちは RunKit'))