File tree 2 files changed +15
-2
lines changed
2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 62
62
plugins : [
63
63
function ( hook , vm ) {
64
64
hook . beforeEach ( function ( html ) {
65
- var url = 'https://github.com/docsifyjs/docsify/blob/master/docs/' + vm . route . file
65
+ if ( / g i t h u b u s e r c o n t e n t \. c o m / . test ( vm . route . file ) ) {
66
+ url = vm . route . file
67
+ . replace ( 'raw.githubusercontent.com' , 'github.com' )
68
+ . replace ( / \/ m a s t e r / , '/blob/master' )
69
+ } else {
70
+ url = 'https://github.com/docsifyjs/docsify/blob/master/' + vm . route . file
71
+ }
66
72
var editHtml = '[:memo: Edit Document](' + url + ')\n'
67
73
68
74
return editHtml
Original file line number Diff line number Diff line change 42
42
plugins : [
43
43
function ( hook , vm ) {
44
44
hook . beforeEach ( function ( html ) {
45
- var url = 'https://github.com/docsifyjs/docsify/blob/master/' + vm . route . file
45
+ var url
46
+ if ( / g i t h u b u s e r c o n t e n t \. c o m / . test ( vm . route . file ) ) {
47
+ url = vm . route . file
48
+ . replace ( 'raw.githubusercontent.com' , 'github.com' )
49
+ . replace ( / \/ m a s t e r / , '/blob/master' )
50
+ } else {
51
+ url = 'https://github.com/docsifyjs/docsify/blob/master/' + vm . route . file
52
+ }
46
53
var editHtml = '[:memo: Edit Document](' + url + ')\n'
47
54
48
55
return editHtml
You can’t perform that action at this time.
0 commit comments