From 325ccf22fee9a56eb6bd0ed148bd2cffc7449922 Mon Sep 17 00:00:00 2001 From: Scott Sinclair <252082+pwae@users.noreply.github.com> Date: Tue, 20 Apr 2021 02:33:35 +1000 Subject: [PATCH] Fix issue with version 3 in docs version list (#74089) Previously would subsitute the "3" in "s3" instead of the version location in the URL --- docs/docsite/_themes/sphinx_rtd_theme/ansible_versions.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/docsite/_themes/sphinx_rtd_theme/ansible_versions.html b/docs/docsite/_themes/sphinx_rtd_theme/ansible_versions.html index 3d3d7fc682d..6fa067f54dc 100644 --- a/docs/docsite/_themes/sphinx_rtd_theme/ansible_versions.html +++ b/docs/docsite/_themes/sphinx_rtd_theme/ansible_versions.html @@ -13,10 +13,10 @@ if ( "{{ slug }}" == "{{ current_version }}" ) { option.selected = true; } - if (current_url.search("{{ current_version }}") > -1) { - option.value = current_url.replace("{{ current_version }}","{{ slug }}"); + if (current_url.search("/{{ current_version }}/") > -1) { + option.value = current_url.replace("/{{ current_version }}/","/{{ slug }}/"); } else { - option.value = current_url.replace("latest","{{ slug }}"); + option.value = current_url.replace("/latest/","/{{ slug }}/"); } x.add(option);