-
Notifications
You must be signed in to change notification settings - Fork 965
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
Have to Humanize a string twice #318
Comments
Calling Humanize on all caps shouldn't do anything. You're sure the second run returns what you've reported?! From the documentation if you want Humanizer to change the casing of upper case input you will have to explicitly tell it; e.g.
This is the expected behavior. Please see this for more info. |
Hmmm, that looks like a bug. It shouldn't really change the casing of all caps!! Thanks. Will check it out. As mentioned you can enforce the whole transformation in one hit by passing Transformers in Humanize. |
It changes the caps because of the hyphen and the spaces. I'm not sure how Humanize should behave in this case. |
The reason |
First of all, based on earlier comments, the expected output should be After my first failed attempt, I've spent some time familiarizing myself with the code and test suite. Durin my testing, I have observed the following behavior:
I'm wrapping up my changes and will commit them shortly with workarounds for both behaviors. |
Fixed in #341 |
Start with string: "TEST 1 - THIS IS A TEST"
Humanize it once you get: "TEST 1 THIS IS A TEST"
Humanize it a second time and you get: "Test 1 This is a test"
The code would look something like:
I would expect the second result after the first humanize call.
The text was updated successfully, but these errors were encountered: