Skip to content

Commit d37e8bc

Browse files
committed
fix: correct URL construction in copy functionality
1 parent 2fbc3cf commit d37e8bc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/nimiq-vitepress-theme/src/composables/useSourceCode.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,14 @@ export function useSourceCode() {
7373
const editUrl = computed(() => {
7474
if (!repoURL.value)
7575
return ''
76-
return join(repoURL.value, getRepoFilePath.value)
76+
return `${repoURL.value.replace(/\/$/, '')}/${getRepoFilePath.value}`
7777
})
7878

7979
const sourceCodeUrl = computed(() => {
8080
if (!repoURL.value)
8181
return ''
8282

83-
return join(repoURL.value, 'blob/main', getRepoFilePath.value)
83+
return `${repoURL.value.replace(/\/$/, '')}/blob/main/${getRepoFilePath.value}`
8484
})
8585

8686
const sourceCodeLabel = computed(() => {

0 commit comments

Comments
 (0)