From 708954644d19401d65009dff1ef23cca05c93a53 Mon Sep 17 00:00:00 2001 From: Divyansh Singh <40380293+brc-dd@users.noreply.github.com> Date: Thu, 20 Jan 2022 15:10:14 +0530 Subject: [PATCH] fix: allow using other protocols than http(s) in links --- src/shared/shared.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/shared.ts b/src/shared/shared.ts index c6bbf68d..ce83d83b 100644 --- a/src/shared/shared.ts +++ b/src/shared/shared.ts @@ -9,7 +9,7 @@ export type { DefaultTheme } from '../../types/shared' -export const EXTERNAL_URL_RE = /^https?:|\.(?!html|md)\w+$/i +export const EXTERNAL_URL_RE = /:\/\/|\.(?!html|md)\w+$/i // @ts-ignore export const inBrowser = typeof window !== 'undefined'