m->d support spoilers

This commit is contained in:
Cadence Ember
2023-08-29 01:37:14 +12:00
parent 56fe710392
commit 0d9191ed5c
3 changed files with 42 additions and 3 deletions
+10
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 (