From afd56820db2b887177f296a9b7003daedcdb96b0 Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Tue, 21 May 2024 23:58:37 -0300 Subject: [PATCH] Revert "MessageLinkEmbeds: No longer need to reset global regex" It is still needed for messageLinkRegex.test --- src/plugins/messageLinkEmbeds/index.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/plugins/messageLinkEmbeds/index.tsx b/src/plugins/messageLinkEmbeds/index.tsx index dea58647..6c8fd83e 100644 --- a/src/plugins/messageLinkEmbeds/index.tsx +++ b/src/plugins/messageLinkEmbeds/index.tsx @@ -376,6 +376,9 @@ export default definePlugin({ if (!messageLinkRegex.test(props.message.content)) return null; + // need to reset the regex because it's global + messageLinkRegex.lastIndex = 0; + return (