]> git.lizzy.rs Git - rust.git/commitdiff
fixup! Show configs from different versions on github pages
authorAyaz Hafiz <ayaz.hafiz.1@gmail.com>
Mon, 1 Jun 2020 01:16:53 +0000 (18:16 -0700)
committerCaleb Cartwright <calebcartwright@users.noreply.github.com>
Wed, 18 Aug 2021 02:55:26 +0000 (21:55 -0500)
docs/index.html

index 49435e6ab368375fe527adf56e0142c79a43ecf4..ea2366863a79655198bb66de1b8bbb8a3693d942 100644 (file)
@@ -75,7 +75,6 @@
           </article>
         </div>
         <script>
-            const MajorVersionBounds = {min: 1, max: 2};
             const RusfmtTagsUrl = 'https://api.github.com/repos/rust-lang/rustfmt/tags';
             const UrlHash = window.location.hash.replace(/^#/, '');
             new Vue({
                 const reMajorVersion = /v(\d+)/;
                 const tagOptions = tags
                   .map(tag => tag.name)
-                  .filter(tag => {
-                    const versionMatches = tag.match(reMajorVersion);
-                    if (!versionMatches || !versionMatches[1]) {
-                      return false;
-                    }
-                    const majorVersion = +versionMatches[1];
-                    // There are some superfluous version tags (e.g. a v8.1 tag), so we do some
-                    // sanity checking of the tags here.
-                    return majorVersion >= MajorVersionBounds.min &&
-                      majorVersion <= MajorVersionBounds.max;
-                  });
+                  .filter(tag => tag.startsWith('v'));
                 this.versionOptions = this.versionOptions.concat(tagOptions);
               },
               mounted() {