diff --git a/autoload/rhubarb.vim b/autoload/rhubarb.vim index c6bf819..ef3a392 100644 --- a/autoload/rhubarb.vim +++ b/autoload/rhubarb.vim @@ -29,7 +29,7 @@ function! rhubarb#HomepageForUrl(url) abort for domain in domains let domain_pattern .= '\|' . escape(split(substitute(domain, '/$', '', ''), '://')[-1], '.') endfor - let base = matchstr(a:url, '^\%(https\=://\%([^@/:]*@\)\=\|git://\|git@\|ssh://git@\)\=\zs\('.domain_pattern.'\)[/:].\{-\}\ze\%(\.git\)\=/\=$') + let base = matchstr(a:url, '^\%(https\=://\%([^@/:]*@\)\=\|git://\|git@\|ssh://git@\|org-\d\+@\|ssh://org-\d\+@\)\=\zs\('.domain_pattern.'\)[/:].\{-\}\ze\%(\.git\)\=/\=$') if index(domains, 'http://' . matchstr(base, '^[^:/]*')) >= 0 return 'http://' . tr(base, ':', '/') elseif !empty(base)