chore: add vant-markdown-loader package

This commit is contained in:
陈嘉涵
2019-08-21 14:45:40 +08:00
parent 2e537b1c81
commit f9b89ad53e
6 changed files with 613 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
const hljs = require('highlight.js');
module.exports = function highlight(str, lang) {
if (lang && hljs.getLanguage(lang)) {
return hljs.highlight(lang, str, true).value;
}
return '';
};