corrects regex error for pages with 'v' in the URL

This commit is contained in:
Pete Lumbis 2022-09-13 20:25:55 -04:00
parent 4f266e42da
commit f93c6e4c00
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@
<div class="versions">
{{ end }}
<div><div><select onchange="window.location.href = this.value">
{{ $master_url := replace (replace .Page.RelPermalink .Page.Params.version "master") "v" "" }}
{{ $master_url := replaceRE "v[0-9].[0-9]" "master" .Permalink }}
{{ if $master_ver }}
{{ if eq .Page.Params.version $cur_ver }}
<option selected="" value="{{ $master_url | absURL }}">Crossplane master</option>