forked from cadence/out-of-your-element
Put < > around ALL the matrix.to links
This commit is contained in:
parent
566b2a9d9e
commit
7a00b95883
2 changed files with 35 additions and 1 deletions
|
@ -724,7 +724,7 @@ async function eventToMessage(event, guild, di) {
|
|||
content = turndownService.turndown(root)
|
||||
|
||||
// Put < > around any surviving matrix.to links to hide the URL previews
|
||||
content = content.replace(/\bhttps?:\/\/matrix\.to\/[^ )]*/, "<$&>")
|
||||
content = content.replace(/\bhttps?:\/\/matrix\.to\/[^ )]*/g, "<$&>")
|
||||
|
||||
// It's designed for commonmark, we need to replace the space-space-newline with just newline
|
||||
content = content.replace(/ \n/g, "\n")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue