Skip to content

Commit

Permalink
Fix name parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
pvdlg committed May 20, 2018
1 parent ff3919e commit 80ecaf0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/index.js
Expand Up @@ -55,7 +55,7 @@ function gitUrlParse(url) {
// Note: Some hosting services (e.g. Visual Studio Team Services) allow whitespace characters
// in the repository and owner names so we decode the URL pieces to get the correct result
urlInfo.git_suffix = /\.git$/.test(urlInfo.pathname);
urlInfo.name = decodeURIComponent(urlInfo.pathname.substring(1).replace(/\.git$/, ""));
urlInfo.name = decodeURIComponent(urlInfo.pathname.replace(/^\//, '').replace(/\.git$/, ""));
urlInfo.owner = decodeURIComponent(urlInfo.user);

switch (urlInfo.source) {
Expand Down

0 comments on commit 80ecaf0

Please sign in to comment.