Skip to content

Commit 916c238

Browse files
ayazhafizcalebcartwright
authored andcommitted
fixup! Show configs from different versions on github pages
1 parent 6959d03 commit 916c238

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

docs/index.html

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@
7575
</article>
7676
</div>
7777
<script>
78-
const MajorVersionBounds = {min: 1, max: 2};
7978
const RusfmtTagsUrl = 'https://api.github.com/repos/rust-lang/rustfmt/tags';
8079
const UrlHash = window.location.hash.replace(/^#/, '');
8180
new Vue({
@@ -129,17 +128,7 @@
129128
const reMajorVersion = /v(\d+)/;
130129
const tagOptions = tags
131130
.map(tag => tag.name)
132-
.filter(tag => {
133-
const versionMatches = tag.match(reMajorVersion);
134-
if (!versionMatches || !versionMatches[1]) {
135-
return false;
136-
}
137-
const majorVersion = +versionMatches[1];
138-
// There are some superfluous version tags (e.g. a v8.1 tag), so we do some
139-
// sanity checking of the tags here.
140-
return majorVersion >= MajorVersionBounds.min &&
141-
majorVersion <= MajorVersionBounds.max;
142-
});
131+
.filter(tag => tag.startsWith('v'));
143132
this.versionOptions = this.versionOptions.concat(tagOptions);
144133
},
145134
mounted() {

0 commit comments

Comments
 (0)