Skip to content

Commit

Permalink
{{withPackageOf}}: Remove leading "git+" from dependency repository urls
Browse files Browse the repository at this point in the history
  • Loading branch information
Nils Knappmeier committed Dec 21, 2015
1 parent 0e3fdf9 commit af24469
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion handlebars/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit af24469

Please sign in to comment.