Skip to content

Commit 6da3ac2

Browse files
committed
Update api-link-parser.js
1 parent 36a3348 commit 6da3ac2

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

api-link-parser.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,15 @@ function decodeLink(url) {
3535
// if link exists
3636
if (link.length > 1) {
3737

38+
// if link is a Git URL
39+
if (isGithub && url.endsWith('.git')) {
40+
41+
// slice .git ending
42+
url = url.slice(0, -('.git'.length));
43+
44+
}
45+
46+
3847
linkData.user = link[0];
3948
linkData.repo = link[1];
4049

0 commit comments

Comments
 (0)