Skip to content

Commit 4a8bfb9

Browse files
committed
ProductSelector: Match product identifier exactly
Resolve issues when a product ID is a subset of another
1 parent 80dca4d commit 4a8bfb9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

layouts/partials/sidebar-v2.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
{{ range $product := $group.products }}
2121
{{ if not $product.extUrl }}
2222
{{ $escaped := replace $product.url "/" "\\/" }}
23-
{{ $pattern := printf "/%s(|$)" $escaped }}
23+
{{ $pattern := printf "/(%s)/" $escaped }}
2424
{{ if strings.FindRE $pattern $normalizedPath }}
2525
{{ $currentProductTitle = $product.title }}
2626
{{ end }}

0 commit comments

Comments
 (0)