This repository has been archived on 2018-10-12. You can view files and clone it, but cannot push or open issues or pull requests.
|
'use strict';
|
|
|
|
const marked = require('marked');
|
|
const hlite = require('highlight.js');
|
|
|
|
module.exports = function (text) {
|
|
marked.setOptions({
|
|
highlight(code) {
|
|
return hlite.highlightAuto(code).value;
|
|
},
|
|
});
|
|
|
|
return marked(text);
|
|
}; |