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 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 ( {
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 ( ) {
172161 const lastIndex = stack . length - 1 ;
173162 stack [ lastIndex ] . push ( next ) ;
174163 return stack ;
175- } ,
164+ } ,
176165 [ [ ] ] ) ;
177166 } ) ;
178167 }
209198 configurationAbout , ...configurationDescriptions
210199 ] = configurations ;
211200 configurationAbout . value . links = { } ;
212-
201+
213202 return {
214203 about,
215204 configurationAbout : configurationAbout . value ,
You can’t perform that action at this time.
0 commit comments