Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 2044931

Browse files
committed
Better version ordering of documentation
1 parent 5e03d5b commit 2044931

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

util/gh-pages/versions.html

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ <h3 class="panel-title">
3636
<ul class="list-group">
3737
<a class="list-group-item" ng-repeat="version in data | orderBy:versionOrder:true"
3838
href="./{{version}}/index.html">
39-
{{normalizeVersion(version)}}
39+
{{normalizeVersionDisplay(version)}}
4040
</a>
4141
</ul>
4242
</article>
@@ -54,10 +54,14 @@ <h3 class="panel-title">
5454
.controller('docVersions', function ($scope, $http) {
5555
$scope.loading = true;
5656

57-
$scope.normalizeVersion = function(v) {
57+
$scope.normalizeVersionDisplay = function(v) {
5858
return v.replace(/^v/, '');
5959
};
6060

61+
$scope.normalizeVersion = function(v) {
62+
return v.replace(/^v/, '').replace(/^rust-/, '');
63+
};
64+
6165
$scope.versionOrder = function(v) {
6266
if (v === 'master') { return Infinity; }
6367
if (v === 'current') { return Number.MAX_VALUE; }

0 commit comments

Comments
 (0)