2016-12-14 19:54:17 +00:00
|
|
|
// Module App.BlogEntry
|
|
|
|
|
2017-01-09 22:58:38 +00:00
|
|
|
showdown = require("showdown");
|
|
|
|
|
|
|
|
showdown.extension('blog', function() {
|
|
|
|
return [{
|
|
|
|
type: 'output',
|
|
|
|
regex: /<ul>/g,
|
|
|
|
replace: '<ul class="browser-default">'
|
|
|
|
}];
|
|
|
|
});
|
|
|
|
|
2016-12-18 15:03:16 +00:00
|
|
|
exports.mdify = function(corpus) {
|
2017-01-09 22:58:38 +00:00
|
|
|
var converter = new showdown.Converter({ extensions: ['blog'] });
|
2016-12-18 15:03:16 +00:00
|
|
|
return converter.makeHtml(corpus);
|
2017-01-09 22:58:38 +00:00
|
|
|
};
|