From 6550a8e559c72ed4ef34f31fbf5a2276b478ca7d Mon Sep 17 00:00:00 2001 From: Florian Dieminger Date: Mon, 16 Dec 2024 21:44:43 +0100 Subject: [PATCH] fix(placement): fix pattern regex --- client/src/placement-context.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/client/src/placement-context.tsx b/client/src/placement-context.tsx index 2dc2a6990cbc..b0677a956b14 100644 --- a/client/src/placement-context.tsx +++ b/client/src/placement-context.tsx @@ -31,27 +31,27 @@ const PLACEMENT_MAP: Record = { side: { typ: "side", pattern: - /\/[^/]+\/(play|docs\/|blog\/|observatory\/?|curriculum\/[^$]|search$)/i, + /^\/[^/]+\/(play|docs\/|blog\/|observatory\/?|curriculum\/[^$]|search$)/i, }, top: { typ: "top-banner", - pattern: /\/[^/]+\/(?!$|_homepage$).*/i, + pattern: /^\/[^/]+\/(?!$|_homepage$).*/i, }, hpTop: { typ: "top-banner", - pattern: /\/[^/]+\/($|_homepage$)/i, + pattern: /^\/[^/]+\/($|_homepage$)/i, }, hpMain: { typ: "hp-main", - pattern: /\/[^/]+\/($|_homepage$)/i, + pattern: /^\/[^/]+\/($|_homepage$)/i, }, hpFooter: { typ: "hp-footer", - pattern: /\/[^/]+\/($|_homepage$)/i, + pattern: /^\/[^/]+\/($|_homepage$)/i, }, bottom: { typ: "bottom-banner", - pattern: /\/[^/]+\/docs\//i, + pattern: /^\/[^/]+\/docs\//i, }, };