From d313d972bf592de77f2af13cb3fc4226247cb1a1 Mon Sep 17 00:00:00 2001 From: Nicolas Dechesne Date: Fri, 11 Sep 2020 10:14:05 +0200 Subject: sphinx: remove leading '/' When switching back and forth between between regular and mega manual an extra '/' keeps being added to the URL. Reported-by: Quentin Schulz (From yocto-docs rev: 4cb64afb2ab544d3f6433adc64824414838648ac) Signed-off-by: Nicolas Dechesne Signed-off-by: Richard Purdie --- documentation/sphinx-static/switchers.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'documentation') diff --git a/documentation/sphinx-static/switchers.js b/documentation/sphinx-static/switchers.js index c8a94d93ba..32113cfa96 100644 --- a/documentation/sphinx-static/switchers.js +++ b/documentation/sphinx-static/switchers.js @@ -180,12 +180,12 @@ var current_version = DOCUMENTATION_OPTIONS.VERSION; // Assume manuals before 3.2 are using old docbook mega-manual if (ver_compare(current_version, "3.2") < 0) { - var new_url = docroot + "/mega-manual/mega-manual.html"; + var new_url = docroot + "mega-manual/mega-manual.html"; } else { - var new_url = docroot + "/singleindex.html"; + var new_url = docroot + "singleindex.html"; } } else { - var new_url = url.replace("/singleindex.html", "/index.html") + var new_url = url.replace("singleindex.html", "index.html") } if (new_url != url) { -- cgit v1.2.3-54-g00ecf