mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 18:54:24 +00:00
feat(vant-markdown-loader): rEADME 中引入 demo 组件时支持设置 playground 属性
This commit is contained in:
14
packages/vant-markdown-loader/src/md-parser.js
Normal file
14
packages/vant-markdown-loader/src/md-parser.js
Normal 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;
|
Reference in New Issue
Block a user