v 3.0 doesn't allow Rule Extending (formally converters)
Closed this issue · 2 comments
mixmix commented
e.g.
var turndownService = new TurndownService()
turndownService.addRule('strikethrough', {
filter: ['del', 's', 'strike'],
replacement: function (content) {
return '~' + content + '~'
}
})
turndownService.turndown(stringOfHTML)
This means that the { converters }
option probably needs to be a rules
opttion, which where each rule is manually added with addRule
at init ?
IonicaBizau commented
Good point! 👍 Indeed!
Contributions are welcome in this direction!
peterchappell commented
I came across a similar need to use a custom converter using the new "rules" approach.
So I've created a PR here: #59