UNPKG

372 BJavaScriptView Raw
1const md = require('./marked');
2
3const renderer = new marked.Renderer();
4
5function process(source) {
6 source = md(source);
7 const res = JSON.stringify(source);
8 return res;
9}
10
11
12module.exports = function(source, map){
13 this.cacheable && this.cacheable();
14 //对source进行解析
15 var exports = process(source);
16 return "module.exports = " + exports;
17}
\No newline at end of file