From af244690111ac841516c36ff488ec06345d7e2b6 Mon Sep 17 00:00:00 2001 From: Nils Knappmeier Date: Tue, 22 Dec 2015 00:23:02 +0100 Subject: [PATCH] {{withPackageOf}}: Remove leading "git+" from dependency repository urls --- handlebars/helpers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handlebars/helpers.js b/handlebars/helpers.js index 72cfb4a..86d65ef 100644 --- a/handlebars/helpers.js +++ b/handlebars/helpers.js @@ -226,7 +226,7 @@ module.exports = { var data = Handlebars.createFrame(options.data || {}) // Build url to correct version and file in github if (url && url.match(/github.com/)) { - data.url = url.replace(/\.git$/, '') + '/blob/v' + version + '/' + relativePath + data.url = url.replace(/^git\+/, '').replace(/\.git$/, '') + '/blob/v' + version + '/' + relativePath } data['package'] = packageJson }