const MarkdownIt = require('markdown-it'); const markdownItContainer = require('markdown-it-container'); const markdownItIns = require('markdown-it-ins'); const markdownItKbd = require('markdown-it-kbd'); const markdownItMark = require('markdown-it-mark'); const markdownItReplaceIt = require('markdown-it-replace-it'); const markdown = MarkdownIt({ html: true, xhtmlOut: false, breaks: false, langPrefix: 'language-', linkify: false, typographer: false }); // Third-party plugins markdown.use(markdownItContainer); markdown.use(markdownItIns); markdown.use(markdownItKbd); markdown.use(markdownItMark); markdown.use(markdownItReplaceIt); // Callouts ['tip', 'warning', 'danger'].forEach(type => { markdown.use(markdownItContainer, type, { render: function (tokens, idx) { if (tokens[idx].nesting === 1) { return `