From bed586383f5b9f5720a91a8ac0ab5de987b8be8a Mon Sep 17 00:00:00 2001 From: schroda <50052685+schroda@users.noreply.github.com> Date: Mon, 15 Jan 2024 23:22:18 +0100 Subject: [PATCH] Update extension repo regex to server changes (#554) --- src/screens/settings/ServerSettings.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/screens/settings/ServerSettings.tsx b/src/screens/settings/ServerSettings.tsx index e68a855f..fe694c12 100644 --- a/src/screens/settings/ServerSettings.tsx +++ b/src/screens/settings/ServerSettings.tsx @@ -150,7 +150,7 @@ export const ServerSettings = () => { placeholder="https://github.com/MY_ACCOUNT/MY_REPO/tree/repo" validateItem={(repo) => !!repo.match( - /https:\/\/(?:www|raw)?(?:github|githubusercontent)\.com\/([^/]+)\/([^/]+)(?:\/(?:tree|blob)\/(.*))?\/?/g, + /https:\/\/(www\.|raw\.)?(github|githubusercontent)\.com\/([^/]+)\/([^/]+)((\/tree|\/blob)?\/([^/\n]*))?(\/([^/\n]*\.json)?)?/g, ) } invalidItemError={t('extension.settings.repositories.custom.error.label.invalid_url')}