From 7cd4dc5bdcc372d3ada58ac3cd90837907bde33c Mon Sep 17 00:00:00 2001 From: nin0dev Date: Fri, 1 Nov 2024 11:00:49 -0400 Subject: [PATCH] better regex --- index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.tsx b/index.tsx index f76f205..c15f8f8 100644 --- a/index.tsx +++ b/index.tsx @@ -6,7 +6,7 @@ import { Button, ChannelStore, Forms } from "@webpack/common"; import { Message } from "discord-types/general"; const WHITELISTED_SHARE_CHANNELS = ["1256395889354997771", "1032200195582197831"]; -const CLONE_LINK_REGEX = /(https:\/\/(?:github\.com|git\.nin0\.dev|codeberg\.org)\/[a-zA-Z0-9]+\/[a-zA-Z0-9]+(?:\.git)?(?:\/)?)/; +const CLONE_LINK_REGEX = /(https:\/\/(?:git(?:hub|lab)\.com|git\.(?:[a-zA-Z0-9]|\.)+|codeberg\.org)\/[a-zA-Z0-9]+\/[a-zA-Z0-9]+(?:\.git)?(?:\/)?)/; function UserpluginInstallButton({ props }: any) { const message: Message = props.message;