Skip to content

Commit 4cb335a

Browse files
committed
Renamed github_base_url to avoid confusion with method
1 parent de113fb commit 4cb335a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

nbviewer/providers/github/handlers.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -388,26 +388,26 @@ def uri_rewrites(rewrites=[]):
388388
]
389389
# github enterprise
390390
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]
392392

393393
github_rewrites.extend([
394394
# raw view
395-
(r'^' + github_url
395+
(r'^' + github_base_url
396396
+ r'([^\/]+)/([^\/]+)/raw/([^\/]+)/(.*)',
397397
u'/github/{0}/{1}/blob/{2}/{3}'),
398398

399399
# trees & blobs
400-
(r'^' + github_url
400+
(r'^' + github_base_url
401401
+ r'([\w\-]+)/([^\/]+)/(blob|tree)/(.*)$',
402402
u'/github/{0}/{1}/{2}/{3}'),
403403

404404
# user/repo
405-
(r'^' + github_url
405+
(r'^' + github_base_url
406406
+ r'([\w\-]+)/([^\/]+)/?$',
407407
u'/github/{0}/{1}/tree/master'),
408408

409409
# user
410-
(r'^' + github_url
410+
(r'^' + github_base_url
411411
+ r'([\w\-]+)/?$',
412412
u'/github/{0}/'),
413413
])

0 commit comments

Comments
 (0)