File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 99 </ label >
1010 </ div >
1111
12- {{ $relPermalink := . RelPermalink }}
12+ {{ $relPermalink := (urls.Parse . RelPermalink).Path }}
1313 {{ $currentProductTitle := "" }}
1414
1515 {{ with index .Site.Data "product-selector" }}
1616 {{ range $group := . }}
1717 {{ range $product := $group.products }}
1818 {{ if not $product.extUrl }}
19- {{ warnf "$relPermalink: %s" $relPermalink }}
20- {{ warnf "$product.url: %s " $product.url }}
21- {{ if strings.Contains $relPermalink $product.url }}
19+ {{ $escaped := replace $product.url "/" "\\/" }}
20+ {{ $pattern := printf "/%s(/|$) " $escaped }}
21+ {{ if strings.FindRE $pattern $relPermalink }}
2222 {{ $currentProductTitle = $product.title }}
2323 {{ end }}
2424 {{ end }}
2727 {{ end }}
2828
2929
30+
3031 < div class ="product-selector ">
3132 < details class ="product-selector__section ">
3233 < summary class ="product-selector__toggle ">
You can’t perform that action at this time.
0 commit comments