Skip to content

Commit

Permalink
fix(placement): fix pattern regex (#12317)
Browse files Browse the repository at this point in the history
  • Loading branch information
fiji-flo authored Dec 17, 2024
1 parent 4aeeddf commit 18a1b26
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions client/src/placement-context.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,27 +31,27 @@ const PLACEMENT_MAP: Record<PlacementType, { typ: string; pattern: RegExp }> = {
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,
},
};

Expand Down

0 comments on commit 18a1b26

Please sign in to comment.