favicon-server/lib/pug-filter-markdown-it-prism.js
2019-02-13 16:49:10 +08:00

9 lines
233 B
JavaScript

const MarkdownIt = require('markdown-it');
const prism = require('markdown-it-prism');
module.exports = (markdown, options) => {
const md = new MarkdownIt(options);
md.use(prism, options.prism);
return md.render(markdown);
};