From c96ef638fdad968a2d6ca170eee59722b99b7b32 Mon Sep 17 00:00:00 2001 From: ScienJus Date: Mon, 25 Jun 2018 16:56:09 +0800 Subject: [PATCH] support endline in gitlab (#94) --- src/gitProvider.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gitProvider.js b/src/gitProvider.js index 8f65e54..301e651 100644 --- a/src/gitProvider.js +++ b/src/gitProvider.js @@ -65,7 +65,7 @@ class Bitbucket extends BaseProvider { class GitLab extends BaseProvider { webUrl(branch, filePath, line, endLine) { if (filePath) { - return `${this.baseUrl}/blob/${branch}` + (filePath ? `${filePath}` : '') + (line ? `#L${line}` : ''); + return `${this.baseUrl}/blob/${branch}` + (filePath ? `${filePath}` : '') + (line ? `#L${line}` : '') + (endLine ? '-' + endLine : ''); } return `${this.baseUrl}/tree/${branch}`; }