Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve contributors formatting #31

Merged
merged 1 commit into from
Aug 8, 2023

Conversation

falcucci
Copy link
Owner

@falcucci falcucci commented Aug 8, 2023

improves the formatting of contributors in the project by using a hashset to ensure contributors are only listed once. this is done by introducing a new unify_contributors function, which takes a list of contributors as a string and returns the same string with only unique contributors.

this commit updates the format_contributors_to_md function to call unify_contributors and passes in the list of contributors, which is formatted with the format_items_to_md function. the unify_contributors function uses a hashset to store and remove duplicate contributors. the hashset is then iterated over and the unique values are added to a vec which is then joined with a new line character to form a string of unique contributors.

improves the formatting of contributors in the project by using a `hashset` to ensure contributors are only listed once. this is done by introducing a new `unify_contributors` function, which takes a list of contributors as a `string` and returns the same `string` with only unique contributors.

this commit updates the `format_contributors_to_md` function to call `unify_contributors` and passes in the list of contributors, which is formatted with the `format_items_to_md` function. the `unify_contributors` function uses a `hashset` to store and remove duplicate contributors. the `hashset` is then iterated over and the unique values are added to a `vec` which is then joined with a new line character to form a `string` of unique contributors.
@falcucci falcucci added this to the 2.0 milestone Aug 8, 2023
@falcucci falcucci self-assigned this Aug 8, 2023
@falcucci falcucci linked an issue Aug 8, 2023 that may be closed by this pull request
@falcucci falcucci merged commit bfdd19f into master Aug 8, 2023
@falcucci falcucci deleted the 30-fix-repeated-contributors-list branch August 8, 2023 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fix repeated contributors list
1 participant