page edit 支持 gitee.com

page edit 支持 gitee.com
This commit is contained in:
蒋小小 2022-07-29 21:43:45 +08:00 committed by GitHub
parent d6d01e8581
commit 83c002300c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 0 deletions

View File

@ -107,6 +107,19 @@ export default {
+ path
)
}
// https://gitee.com/-/ide/project/xxx/xxx/edit/master/-/xxxx
const gitee = /gitee.com/
if (gitee.test(docsRepo)) {
const base = docsRepo
return (
base.replace(gitee, 'gitee.com/-/ide/project')
+ `/edit`
+ `/${docsBranch}/-/`
+ (docsDir ? docsDir.replace(endingSlashRE, '') + '/' : '')
+ path
)
}
const base = outboundRE.test(docsRepo)
? docsRepo