Correct dependency links for forks in info

This commit is contained in:
Dragon Fire
2020-02-28 12:02:24 -05:00
parent 6662592316
commit ded920ade2
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -42,7 +42,7 @@ module.exports = class InfoCommand extends Command {
return Object.entries(dependencies).map(dep => {
if (dep[1].startsWith('github:')) {
const repo = dep[1].replace('github:', '').split('/');
return `[${dep[0]}](https://github.com/${repo[0]}/${repo[1].replace(/#.+/, '')})`;
return `[${dep[0]}](https://github.com/${repo[0]}/${repo[1].replace(/#(.+)/, '/tree/$1')})`;
}
return `[${dep[0]}](https://npmjs.com/${dep[0]})`;
}).join(', ');