Simplify regex for bug fix of #172

This commit is contained in:
Buu Nguyen 2015-08-06 06:15:28 -07:00
parent 9cb12455f4
commit 10a6c066eb
1 changed files with 1 additions and 1 deletions

View File

@ -166,7 +166,7 @@ GitHub.prototype.fetchData = function(opts, cb) {
if (moduleUrl) { // fix #105
// special handling for submodules hosted in GitHub
if (~moduleUrl.indexOf('github.com')) {
moduleUrl = moduleUrl.replace(/^(git:\/\/)?(git@)?/, window.location.protocol + '//')
moduleUrl = moduleUrl.replace(/^git(:\/\/|@)/, window.location.protocol + '//')
.replace('github.com:', 'github.com/')
.replace(/.git$/, '')
item.text = '<a href="' + moduleUrl + '" class="jstree-anchor">' + name + '</a>' +