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

Removed extra space getting added in words method #2108

Conversation

sudeeptarlekar
Copy link
Contributor

Issue #2102

Description:

This is patch for the sentence methods in lib, as words sometime returns a word with space in between two characters causing sentence to return more that required number of words even if random word count param as 0 is passed.

Also refactored code and chose map over collect as Ruby best practice.

@tjozwik
Copy link
Contributor

tjozwik commented Aug 14, 2020

@sudeeptarlekar I think, that we can create another param that would be used for either disabling or enabling open compounds in sentences. There is already a param available in Faker::Books::Lovecraft.words and Faker::Hipster.words that allows us to decide if we are also using open compounds as words or not, so it may be a more elegant solution.

@sudeeptarlekar
Copy link
Contributor Author

@tjozwik sounds good, closing this PR in favour of other PR.

@sudeeptarlekar sudeeptarlekar deleted the 2102-hipster-sentence-word-count branch September 3, 2020 04:07
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.

2 participants