We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 6262f9f + 3fed2f5 commit e61540aCopy full SHA for e61540a
1 file changed
site/src/index.js
@@ -208,7 +208,6 @@ class Index extends Component {
208
that.handleError(e);
209
});
210
}
211
- that.hlCode();
212
213
214
// 完成加载进度条
@@ -265,16 +264,12 @@ class Index extends Component {
265
264
266
267
document.title = `${title} - ${titleSuffix}`;
+ this.hlCode();
268
269
270
271
hlCode() {
272
- setTimeout(() => {
273
- let code = document.getElementsByTagName('code');
274
- Array.prototype.forEach.call(code, function (item) {
275
- Prism.highlightElement(item);
276
- });
277
- }, 500);
+ Array.prototype.forEach.call(document.getElementsByTagName('code'), item => Prism.highlightElement(item));
278
279
handleError(err) {
280
Notification.error({
0 commit comments