From d494f2194bb8f1ddcc5a98aab7275479c06ad95f Mon Sep 17 00:00:00 2001 From: Divyansh Singh <40380293+brc-dd@users.noreply.github.com> Date: Thu, 20 Jan 2022 15:01:29 +0530 Subject: [PATCH] fix: assume links containing extension other than html or md as external --- 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 64d78615..c6bbf68d 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?:/i +export const EXTERNAL_URL_RE = /^https?:|\.(?!html|md)\w+$/i // @ts-ignore export const inBrowser = typeof window !== 'undefined'