Skip to content

Commit 6325523

Browse files
committed
fix edit page link
1 parent ca59c16 commit 6325523

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/default-theme/Page.vue

+6-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,12 @@ export default {
5656
const base = outboundRE.test(repo)
5757
? repo
5858
: `https://github.com/${repo}`
59-
return `${base}/edit/${docsBranch}/${docsDir}${path}`.replace(/\/+/g, '/')
59+
return (
60+
base.replace(endingSlashRE, '') +
61+
`/edit/${docsBranch}/` +
62+
docsDir.replace(endingSlashRE, '') +
63+
path
64+
)
6065
}
6166
}
6267
}

0 commit comments

Comments
 (0)