UNPKG

turndown-plugin-showdown

Version:
12 lines (11 loc) 350 B
function taskLists (turndownService) { turndownService.addRule('taskLists', { filter: function (node) { return node.type === 'checkbox' && node.parentNode.nodeName === 'LI' }, replacement: function (content, node) { return (node.checked ? '[x]' : '[ ]'); } }); } module.exports = taskLists;