From f7872887e941c2c312bbf664515078df3867c41f Mon Sep 17 00:00:00 2001 From: David Bar-On Date: Wed, 3 Mar 2021 11:25:59 +0200 Subject: [PATCH] Fix for version config option anchor --- docs/index.html | 18 +++++++++--------- 1 file 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 @@
- - @@ -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;