Skip to content

Commit c598499

Browse files
committed
Update link.js
1 parent 52df153 commit c598499

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

api/link.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ export default function handler(request, response) {
1717

1818
if (url[0] && url[1]) {
1919

20+
if (url[1].endsWith('.git')) {
21+
22+
url[1] = url[1].slice(0, -('.git'.length));
23+
24+
}
25+
2026
if (url[url.length-1].endsWith('.html')
2127
|| url[url.length-1].endsWith('.svg')) {
2228

0 commit comments

Comments
 (0)