Skip to content

Commit ad461e6

Browse files
ayazhafizcalebcartwright
authored andcommitted
fixup! Show configs from different versions on github pages
1 parent fcbd312 commit ad461e6

File tree

1 file changed

+3
-14
lines changed

1 file changed

+3
-14
lines changed

docs/index.html

Lines changed: 3 additions & 14 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() {
@@ -172,7 +161,7 @@
172161
const lastIndex = stack.length - 1;
173162
stack[lastIndex].push(next);
174163
return stack;
175-
},
164+
},
176165
[[]]);
177166
});
178167
}
@@ -209,7 +198,7 @@
209198
configurationAbout, ...configurationDescriptions
210199
] = configurations;
211200
configurationAbout.value.links = {};
212-
201+
213202
return {
214203
about,
215204
configurationAbout: configurationAbout.value,

0 commit comments

Comments
 (0)