From 18a1b2686943863e3f1e63827784269d170b1d2d Mon Sep 17 00:00:00 2001 From: Florian Dieminger Date: Tue, 17 Dec 2024 12:29:38 +0100 Subject: [PATCH] fix(placement): fix pattern regex (#12317) --- 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, }, };