m->d support spoilers

This commit is contained in:
Cadence Ember 2023-08-29 01:36:15 +12:00
commit 0d9191ed5c
3 changed files with 42 additions and 3 deletions

View file

@ -57,6 +57,16 @@ turndownService.addRule("blockquote", {
}
})
turndownService.addRule("spoiler", {
filter: function (node, options) {
return node.hasAttribute("data-mx-spoiler")
},
replacement: function (content, node) {
return "||" + content + "||"
}
})
turndownService.addRule("inlineLink", {
filter: function (node, options) {
return (