postboy
Version:
A command line tool to build emails
13 lines (11 loc) • 380 B
JavaScript
var $$ = function (html) { return require('cheerio').load(html,{decodeEntities:false, xmlMode:true}); };
module.exports = function (input, output, enable) {
if(enable) {
var $ = $$(input);
$('a[href]:not(a[nowrap])').each(function () {
$(this).html('<span class="anchor_wrap">' + $(this).html() + '</span>');
});
input = $.html();
}
output(input);
};