Skip to content

Commit c3bd004

Browse files
authored
fix(docs): use regex to normalize URL with better browser support (#3147)
1 parent 9dfe0bf commit c3bd004

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/components/sidebar.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export default {
5757
},
5858
methods: {
5959
buildUrl(basePath, parts = []) {
60-
return `${basePath}/${parts.join('/')}`.replace(/(?<!:)(?:\/){2,}/g, '/')
60+
return `${basePath}/${parts.join('/')}`.replace(/(https?:\/\/)|(\/)+/g, '$1$2')
6161
}
6262
}
6363
}

0 commit comments

Comments
 (0)