From 2b8755de80c804c9d4d60e021a1d75d92f2f8fe9 Mon Sep 17 00:00:00 2001 From: Alex Kirk Date: Fri, 1 Dec 2023 10:54:07 +0100 Subject: [PATCH] Make regex ungreedy --- src/SlackMessageParser.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SlackMessageParser.ts b/src/SlackMessageParser.ts index ecc2d8ae..e183c92e 100644 --- a/src/SlackMessageParser.ts +++ b/src/SlackMessageParser.ts @@ -237,7 +237,7 @@ export class SlackMessageParser { // TODO: This is fixing plaintext mentions, but should be refactored. // https://github.com/matrix-org/matrix-appservice-slack/issues/110 - body = body.replace(//g, "$1"); + body = body.replace(/]+)>/g, "$1"); // Convert plain text body to HTML. // We first run it through Slackdown, which will convert some elements to HTML.