forked from cadence/out-of-your-element
m->d support spoilers
This commit is contained in:
parent
56fe710392
commit
0d9191ed5c
3 changed files with 42 additions and 3 deletions
|
@ -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 (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue