File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
nbviewer/providers/github Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -388,26 +388,26 @@ def uri_rewrites(rewrites=[]):
388
388
]
389
389
# github enterprise
390
390
if os .environ .get ('GITHUB_API_URL' , '' ) != '' :
391
- github_url = os .environ .get ('GITHUB_API_URL' ).split ('api/v3' )[0 ]
391
+ github_base_url = os .environ .get ('GITHUB_API_URL' ).split ('api/v3' )[0 ]
392
392
393
393
github_rewrites .extend ([
394
394
# raw view
395
- (r'^' + github_url
395
+ (r'^' + github_base_url
396
396
+ r'([^\/]+)/([^\/]+)/raw/([^\/]+)/(.*)' ,
397
397
u'/github/{0}/{1}/blob/{2}/{3}' ),
398
398
399
399
# trees & blobs
400
- (r'^' + github_url
400
+ (r'^' + github_base_url
401
401
+ r'([\w\-]+)/([^\/]+)/(blob|tree)/(.*)$' ,
402
402
u'/github/{0}/{1}/{2}/{3}' ),
403
403
404
404
# user/repo
405
- (r'^' + github_url
405
+ (r'^' + github_base_url
406
406
+ r'([\w\-]+)/([^\/]+)/?$' ,
407
407
u'/github/{0}/{1}/tree/master' ),
408
408
409
409
# user
410
- (r'^' + github_url
410
+ (r'^' + github_base_url
411
411
+ r'([\w\-]+)/?$' ,
412
412
u'/github/{0}/' ),
413
413
])
You can’t perform that action at this time.
0 commit comments