turndown-plugin-showdown
Version:
Turndown plugin based on the Showdow library
20 lines (15 loc) • 451 B
JavaScript
function underline(turndownService){
Object.defineProperty(turndownService.options, "emDelimiter",{
get: () => '*',
});
Object.defineProperty(turndownService.options, "strongDelimiter",{
get: () => '**',
});
turndownService.addRule("underline",{
filter: "u",
replacement: function(content){
return `__${content}__`;
}
});
}
module.exports = underline;