We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1dfe597 commit 447cde2Copy full SHA for 447cde2
src/content/docs/404.mdx
@@ -18,9 +18,9 @@ window.onload = function () {
18
window.location.replace('/' + latest_dir_name + '/' + path.slice(path.length == 7 ? 7 : 8))
19
}
20
// redirect a semver (/2.0.1) to a directory name (/2_0)
21
- let parts = path.match(/^\\/([0-9]+)\\.([0-9])+\\.[0-9]+(\\/.*)?$/)?.groups;
+ let parts = path.match(/^\\/(?<major>[0-9]+)\\.(?<minor>[0-9])+\\.[0-9]+(?<rest>\\/.*)?$/)?.groups;
22
if (parts) {
23
- window.location.replace('/' + parts[1] + '_' + parts[2] + parts[3] || '')
+ window.location.replace('/' + parts['major'] + '_' + parts['minor'] + parts['rest'] || '')
24
25
};
26
`}</script>
0 commit comments