File tree Expand file tree Collapse file tree 1 file changed +3
-14
lines changed Expand file tree Collapse file tree 1 file changed +3
-14
lines changed Original file line number Diff line number Diff line change 75
75
</ article >
76
76
</ div >
77
77
< script >
78
- const MajorVersionBounds = { min : 1 , max : 2 } ;
79
78
const RusfmtTagsUrl = 'https://api.github.com/repos/rust-lang/rustfmt/tags' ;
80
79
const UrlHash = window . location . hash . replace ( / ^ # / , '' ) ;
81
80
new Vue ( {
129
128
const reMajorVersion = / v ( \d + ) / ;
130
129
const tagOptions = tags
131
130
. 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' ) ) ;
143
132
this . versionOptions = this . versionOptions . concat ( tagOptions ) ;
144
133
} ,
145
134
mounted ( ) {
172
161
const lastIndex = stack . length - 1 ;
173
162
stack [ lastIndex ] . push ( next ) ;
174
163
return stack ;
175
- } ,
164
+ } ,
176
165
[ [ ] ] ) ;
177
166
} ) ;
178
167
}
209
198
configurationAbout , ...configurationDescriptions
210
199
] = configurations ;
211
200
configurationAbout . value . links = { } ;
212
-
201
+
213
202
return {
214
203
about,
215
204
configurationAbout : configurationAbout . value ,
You can’t perform that action at this time.
0 commit comments