Skip to content

Commit 586c3db

Browse files
ayazhafizcalebcartwright
authored andcommitted
fixup! Ensure that doc url hash IDs are scrolled to on page load
1 parent 2dcc2a0 commit 586c3db

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

docs/index.html

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,16 +161,14 @@
161161
</h${level}>`;
162162
};
163163

164-
const html = marked.parser(ast, {
164+
return marked.parser(ast, {
165165
highlight(code, lang) {
166166
return hljs.highlight(lang ? lang : 'rust', code).value;
167167
},
168168
headerIds: true,
169169
headerPrefix: '',
170170
renderer,
171171
});
172-
document.dispatchEvent(new Event('htmlbuilt'));
173-
return html;
174172
}
175173
},
176174
created: async function() {
@@ -181,7 +179,7 @@
181179
.filter(tag => tag.startsWith('v'));
182180
this.versionOptions = this.versionOptions.concat(tagOptions);
183181
},
184-
updated: function() {
182+
updated() {
185183
if (UrlHash === '') return;
186184
this.$nextTick(() => {
187185
const target = document.querySelector(`#${UrlHash}`);

0 commit comments

Comments
 (0)