mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-10 15:14:29 +00:00
Better version ordering of documentation
This commit is contained in:
parent
5e03d5bb06
commit
2044931cbe
1 changed files with 6 additions and 2 deletions
|
@ -36,7 +36,7 @@
|
|||
<ul class="list-group">
|
||||
<a class="list-group-item" ng-repeat="version in data | orderBy:versionOrder:true"
|
||||
href="./{{version}}/index.html">
|
||||
{{normalizeVersion(version)}}
|
||||
{{normalizeVersionDisplay(version)}}
|
||||
</a>
|
||||
</ul>
|
||||
</article>
|
||||
|
@ -54,10 +54,14 @@
|
|||
.controller('docVersions', function ($scope, $http) {
|
||||
$scope.loading = true;
|
||||
|
||||
$scope.normalizeVersion = function(v) {
|
||||
$scope.normalizeVersionDisplay = function(v) {
|
||||
return v.replace(/^v/, '');
|
||||
};
|
||||
|
||||
$scope.normalizeVersion = function(v) {
|
||||
return v.replace(/^v/, '').replace(/^rust-/, '');
|
||||
};
|
||||
|
||||
$scope.versionOrder = function(v) {
|
||||
if (v === 'master') { return Infinity; }
|
||||
if (v === 'current') { return Number.MAX_VALUE; }
|
||||
|
|
Loading…
Reference in a new issue