From f85720766a0ce4ebe7de949a9c5dd4ebd232e06c Mon Sep 17 00:00:00 2001 From: Daniel Li Date: Mon, 17 Jun 2024 15:18:02 +0100 Subject: [PATCH] fix: escape period --- packages/docusaurus/src/commands/serve.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/docusaurus/src/commands/serve.ts b/packages/docusaurus/src/commands/serve.ts index e2446abea84b..a4b0acf1fcb1 100644 --- a/packages/docusaurus/src/commands/serve.ts +++ b/packages/docusaurus/src/commands/serve.ts @@ -80,7 +80,7 @@ export async function serve( if (baseUrl !== '/') { // Not super robust, but should be good enough for our use case // See https://github.com/facebook/docusaurus/pull/10090 - const looksLikeAsset = !!req.url.match(/.[a-zA-Z\d]{1,4}$/); + const looksLikeAsset = !!req.url.match(/\.[a-zA-Z\d]{1,4}$/); if (!looksLikeAsset) { const normalizedUrl = applyTrailingSlash(req.url, { trailingSlash,