1 | const md = require('./marked');
|
2 |
|
3 | const renderer = new marked.Renderer();
|
4 |
|
5 | function process(source) {
|
6 | source = md(source);
|
7 | const res = JSON.stringify(source);
|
8 | return res;
|
9 | }
|
10 |
|
11 |
|
12 | module.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 |