feat(vant-markdown-loader): rEADME 中引入 demo 组件时支持设置 playground 属性

This commit is contained in:
HaoChuan9421
2021-03-12 18:01:24 +08:00
parent c2ac641ec1
commit 336727556e
3 changed files with 40 additions and 29 deletions

View File

@@ -0,0 +1,14 @@
const MarkdownIt = require('markdown-it');
const markdownItAnchor = require('markdown-it-anchor');
const highlight = require('./highlight');
const { slugify } = require('transliteration');
const parser = new MarkdownIt({
html: true,
highlight,
}).use(markdownItAnchor, {
level: 2,
slugify,
});
module.exports = parser;