We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5310054 commit c61c6daCopy full SHA for c61c6da
packages/@vuepress/theme-default/components/PageEdit.vue
@@ -92,12 +92,24 @@ export default {
92
)
93
}
94
95
+ const gitlab = /gitlab.com/
96
+ if (gitlab.test(docsRepo)) {
97
+ const base = docsRepo
98
+ return (
99
+ base.replace(endingSlashRE, '')
100
+ + `/-/edit`
101
+ + `/${docsBranch}/`
102
+ + (docsDir ? docsDir.replace(endingSlashRE, '') + '/' : '')
103
+ + path
104
+ )
105
+ }
106
+
107
const base = outboundRE.test(docsRepo)
108
? docsRepo
109
: `https://github.com/${docsRepo}`
110
return (
111
base.replace(endingSlashRE, '')
- + (/gitlab.com/.test(repo) ? '/-/edit/' : '/edit')
112
+ + '/edit'
113
+ `/${docsBranch}/`
114
+ (docsDir ? docsDir.replace(endingSlashRE, '') + '/' : '')
115
+ path
0 commit comments