From 856858d26a78f2e19e2c8ee23c2e85a95dbfdd29 Mon Sep 17 00:00:00 2001 From: Divyansh Singh <40380293+brc-dd@users.noreply.github.com> Date: Thu, 26 Mar 2026 19:16:37 +0530 Subject: [PATCH] fix: normalize `/index` to `/` closes #5165 --- 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 d0d91cfe2..dade94d29 100644 --- a/src/shared/shared.ts +++ b/src/shared/shared.ts @@ -30,7 +30,7 @@ const UnpackStackView = Symbol('stack-view:unpack') const HASH_WITHOUT_FRAGMENT_RE = /#.*?(?=:~:|$)/ const HASH_OR_QUERY_RE = /[?#].*$/ -const INDEX_OR_EXT_RE = /(?:(^|\/)index)?\.(?:md|html)$/ +const INDEX_OR_EXT_RE = /(?:(^|\/)index)?(?:\.(?:md|html))?$/ export const inBrowser = typeof document !== 'undefined'