diff --git a/main/.buildinfo b/main/.buildinfo index 2252a697c..7bc63cfd9 100644 --- a/main/.buildinfo +++ b/main/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 9d7ba9002136fbab70063d08bcdbb6b3 +config: 50b4c9b7c85c631e3ba7136267120343 tags: d77d1c0d9ca2f4c8421862c7c5a0d620 diff --git a/main/_static/versioning/versioning_menu.html b/main/_static/versioning/versioning_menu.html index 1daf4cef7..68109cf86 100644 --- a/main/_static/versioning/versioning_menu.html +++ b/main/_static/versioning/versioning_menu.html @@ -122,15 +122,33 @@ }); const sortVersions = (a, b) => { - // Alpha versions - if (a.includes("a")) return 1; - if (b.includes("a")) return -1; - if (a.replace("v", "") > b.replace("v", "")) - return -1 - else if (a.replace("v", "") < b.replace("v", "")) - return 1 - else - return 0 + const innerA = a.replace("v", ""); + const innerB = b.replace("v", ""); + + if (innerA.match(/[a-z]/) && !innerB.match(/[a-z]/)) return 1; + if (!innerA.match(/[a-z]/) && innerB.match(/[a-z]/)) return -1; + + const splittedInnerA = innerA.split(""); + const splittedInnerB = innerB.split(""); + + while (splittedInnerA.length && splittedInnerB.length) { + const charA = splittedInnerA.shift(); + const charB = splittedInnerB.shift(); + + if (charA === charB) continue; + else if (charA === ".") return 1; + else if (charB === ".") return -1; + else if (charA.match(/[0-9]/) && charB.match(/[0-9]/)) { + return Number(charB) - Number(charA); + } else { + if (charA < charB) return 1; + else if (charA > charB) return -1; + else return 0; + } + } + if (innerA < innerB) return 1; + else if (innerA > innerB) return -1; + else return 0; } if ((githubUser !== null && githubUser !== "") || (repo !== null && repo !== "")) { @@ -204,4 +222,4 @@ console.error("Invalid versioning configuration"); } - \ No newline at end of file + diff --git a/main/environments/atari/basketball_pong/index.html b/main/environments/atari/basketball_pong/index.html index ed261ea67..58e56ce3f 100644 --- a/main/environments/atari/basketball_pong/index.html +++ b/main/environments/atari/basketball_pong/index.html @@ -560,7 +560,19 @@