about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDavid Bar-On <david.cdb004@gmail.com>2021-03-03 11:25:59 +0200
committerCaleb Cartwright <calebcartwright@users.noreply.github.com>2021-08-17 21:55:26 -0500
commitf7872887e941c2c312bbf664515078df3867c41f (patch)
tree5d7eccb7d1aff44f4679b9fe964540d08c090438
parentec86cfd6ba3412f7a12342a55093efebfac2b4c3 (diff)
downloadrust-f7872887e941c2c312bbf664515078df3867c41f.tar.gz
rust-f7872887e941c2c312bbf664515078df3867c41f.zip
Fix for version config option anchor
-rw-r--r--docs/index.html18
1 files changed, 9 insertions, 9 deletions
diff --git a/docs/index.html b/docs/index.html
index bf4e455df21..c3624bb9df1 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -72,8 +72,8 @@
                   <input type="checkbox" id="stable" v-model="shouldStable">
               </div>
               <div>
-                  <label for="version">version: </label>
-                  <select name="version" id="version" v-model="version">
+                  <label for="viewVersion">version: </label>
+                  <select name="viewVersion" id="viewVersion" v-model="viewVersion">
                     <option v-for="option in versionOptions" v-bind:value="option">
                       {{ option }}
                     </option>
@@ -107,8 +107,8 @@
                 configurationDescriptions: [],
                 searchCondition: searchTerm,
                 shouldStable: false,
-                version: versionNumber,
-                oldVersion: undefined,
+                viewVersion: versionNumber,
+                oldViewVersion: undefined,
                 versionOptions: ['master'],
                 scrolledOnce: false,
               },
@@ -122,13 +122,13 @@
                     return;
                   }
                   if (versionParam == null) {
-                    this.version = latest.name;
+                    this.viewVersion = latest.name;
                   }
                 },
                 async outputHtml() {
-                  if (this.version !== this.oldVersion) {
+                  if (this.viewVersion !== this.oldViewVersion) {
                     const ConfigurationMdUrl =
-                      `https://raw.githubusercontent.com/rust-lang/rustfmt/${this.version}/Configurations.md`;
+                      `https://raw.githubusercontent.com/rust-lang/rustfmt/${this.viewVersion}/Configurations.md`;
                     let res;
                     try {
                       res = await axios.get(ConfigurationMdUrl).catch(e => { throw e });
@@ -144,7 +144,7 @@
                     this.aboutHtml = marked.parser(about);
                     this.configurationAboutHtml = marked.parser(configurationAbout);
                     this.configurationDescriptions = configurationDescriptions;
-                    this.oldVersion = this.version;
+                    this.oldViewVersion = this.viewVersion;
                   }
 
                   const ast = this.configurationDescriptions
@@ -162,7 +162,7 @@
                       }, []);
                   ast.links = {};
 
-                  queryParams.set('version', this.version);
+                  queryParams.set('version', this.viewVersion);
                   queryParams.set('search', this.searchCondition);
                   const curUrl = window.location.pathname +
                     '?' + queryParams.toString() + window.location.hash;