Skip to content

Commit 6550a8e

Browse files
committed
fix(placement): fix pattern regex
1 parent 4aeeddf commit 6550a8e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Diff for: client/src/placement-context.tsx

+6-6
Original file line numberDiff line numberDiff line change
@@ -31,27 +31,27 @@ const PLACEMENT_MAP: Record<PlacementType, { typ: string; pattern: RegExp }> = {
3131
side: {
3232
typ: "side",
3333
pattern:
34-
/\/[^/]+\/(play|docs\/|blog\/|observatory\/?|curriculum\/[^$]|search$)/i,
34+
/^\/[^/]+\/(play|docs\/|blog\/|observatory\/?|curriculum\/[^$]|search$)/i,
3535
},
3636
top: {
3737
typ: "top-banner",
38-
pattern: /\/[^/]+\/(?!$|_homepage$).*/i,
38+
pattern: /^\/[^/]+\/(?!$|_homepage$).*/i,
3939
},
4040
hpTop: {
4141
typ: "top-banner",
42-
pattern: /\/[^/]+\/($|_homepage$)/i,
42+
pattern: /^\/[^/]+\/($|_homepage$)/i,
4343
},
4444
hpMain: {
4545
typ: "hp-main",
46-
pattern: /\/[^/]+\/($|_homepage$)/i,
46+
pattern: /^\/[^/]+\/($|_homepage$)/i,
4747
},
4848
hpFooter: {
4949
typ: "hp-footer",
50-
pattern: /\/[^/]+\/($|_homepage$)/i,
50+
pattern: /^\/[^/]+\/($|_homepage$)/i,
5151
},
5252
bottom: {
5353
typ: "bottom-banner",
54-
pattern: /\/[^/]+\/docs\//i,
54+
pattern: /^\/[^/]+\/docs\//i,
5555
},
5656
};
5757

0 commit comments

Comments
 (0)