File tree Expand file tree Collapse file tree 1 file changed +1
-12
lines changed Expand file tree Collapse file tree 1 file changed +1
-12
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 ( ) {
You can’t perform that action at this time.
0 commit comments