Skip to content

Commit f787288

Browse files
davidBar-Oncalebcartwright
authored andcommitted
Fix for version config option anchor
1 parent ec86cfd commit f787288

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

docs/index.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@
7272
<input type="checkbox" id="stable" v-model="shouldStable">
7373
</div>
7474
<div>
75-
<label for="version">version: </label>
76-
<select name="version" id="version" v-model="version">
75+
<label for="viewVersion">version: </label>
76+
<select name="viewVersion" id="viewVersion" v-model="viewVersion">
7777
<option v-for="option in versionOptions" v-bind:value="option">
7878
{{ option }}
7979
</option>
@@ -107,8 +107,8 @@
107107
configurationDescriptions: [],
108108
searchCondition: searchTerm,
109109
shouldStable: false,
110-
version: versionNumber,
111-
oldVersion: undefined,
110+
viewVersion: versionNumber,
111+
oldViewVersion: undefined,
112112
versionOptions: ['master'],
113113
scrolledOnce: false,
114114
},
@@ -122,13 +122,13 @@
122122
return;
123123
}
124124
if (versionParam == null) {
125-
this.version = latest.name;
125+
this.viewVersion = latest.name;
126126
}
127127
},
128128
async outputHtml() {
129-
if (this.version !== this.oldVersion) {
129+
if (this.viewVersion !== this.oldViewVersion) {
130130
const ConfigurationMdUrl =
131-
`https://raw.githubusercontent.com/rust-lang/rustfmt/${this.version}/Configurations.md`;
131+
`https://raw.githubusercontent.com/rust-lang/rustfmt/${this.viewVersion}/Configurations.md`;
132132
let res;
133133
try {
134134
res = await axios.get(ConfigurationMdUrl).catch(e => { throw e });
@@ -144,7 +144,7 @@
144144
this.aboutHtml = marked.parser(about);
145145
this.configurationAboutHtml = marked.parser(configurationAbout);
146146
this.configurationDescriptions = configurationDescriptions;
147-
this.oldVersion = this.version;
147+
this.oldViewVersion = this.viewVersion;
148148
}
149149

150150
const ast = this.configurationDescriptions
@@ -162,7 +162,7 @@
162162
}, []);
163163
ast.links = {};
164164

165-
queryParams.set('version', this.version);
165+
queryParams.set('version', this.viewVersion);
166166
queryParams.set('search', this.searchCondition);
167167
const curUrl = window.location.pathname +
168168
'?' + queryParams.toString() + window.location.hash;

0 commit comments

Comments
 (0)