From 6f5711b0889f1e3c0e7a6c3b0701ff21dc9a3742 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wit=E3=80=86=E8=8B=97=E5=A4=A7?= <38201220+WitMiao@users.noreply.github.com> Date: Thu, 7 Jul 2022 15:42:50 +0800 Subject: [PATCH] =?UTF-8?q?fix(is.ts):=20=E4=BF=AE=E5=A4=8DisUrl=E6=AD=A3?= =?UTF-8?q?=E5=88=99=E4=B8=8D=E8=83=BD=E5=8C=B9=E9=85=8D=E5=88=B0=20hash?= =?UTF-8?q?=E6=A8=A1=E5=BC=8F=E7=9A=84=E5=A4=96=E9=93=BE=20=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98=20(#2051)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 苗大 --- src/utils/is.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/is.ts b/src/utils/is.ts index 04803cff..0252aa0c 100644 --- a/src/utils/is.ts +++ b/src/utils/is.ts @@ -94,6 +94,6 @@ export const isClient = !isServer; export function isUrl(path: string): boolean { const reg = - /^(((^https?:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+(?::\d+)?|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[\w]*))?)$/; + /^(((^https?:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+(?::\d+)?|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?(\/#\/)?(?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[\w]*))?)$/; return reg.test(path); }