Skip to content

Commit

Permalink
fix: set default value as 7 for contributorsPerLine (#139)
Browse files Browse the repository at this point in the history
fix: set default value as `7` for `contributorsPerLine`

Co-authored-by: Maximilian Berkmann <maxieberkmann@gmail.com>
Co-authored-by: Angel Aviel Domaoan <13580338+tenshiAMD@users.noreply.github.com>
  • Loading branch information
3 people committed Sep 7, 2022
1 parent 0b97062 commit e1fd794
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/generate/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ function formatLine(contributors) {
}

function generateContributorsList(options, contributors) {
const contributorsPerLine = options.contributorsPerLine || 7
return _.flow(
_.sortBy(contributor => {
if (options.contributorsSortAlphabetically) {
Expand All @@ -53,7 +54,7 @@ function generateContributorsList(options, contributors) {
_.map(function formatEveryContributor(contributor) {
return formatContributor(options, contributor)
}),
_.chunk(options.contributorsPerLine),
_.chunk(contributorsPerLine),
_.map(formatLine),
_.join('\n </tr>\n <tr>\n '),
newContent => {
Expand Down

0 comments on commit e1fd794

Please sign in to comment.