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

fixes issue #319 #320

Merged
merged 2 commits into from
Aug 1, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions release_notes.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
###In Development
- [#320](https://github.com/MehdiK/Humanizer/pull/320): Fixed Dehumanize actually humanizing an already dehumanized string

[Commits](https://github.com/MehdiK/Humanizer/compare/v1.28.0...master)

###v1.28.0 - 2014-07-06
Expand Down
1 change: 1 addition & 0 deletions src/Humanizer.Tests/StringDehumanizeTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ public class StringDehumanizeTests
[InlineData("Title Case Sentence Is Camelized", "TitleCaseSentenceIsCamelized")]
[InlineData("Mixed case sentence Is Camelized", "MixedCaseSentenceIsCamelized")]
[InlineData("lower case sentence is camelized", "LowerCaseSentenceIsCamelized")]
[InlineData("AlreadyDehumanizedStringIsUntouched", "AlreadyDehumanizedStringIsUntouched")]
[InlineData("", "")]
public void CanDehumanizeIntoAPascalCaseWord(string input, string expectedResult)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Humanizer/StringDehumanizeExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public static string Dehumanize(this string input)
(from word in input.Split(' ')
select word.Humanize(LetterCasing.Title));

return string.Join("", titlizedWords);
return string.Join("", titlizedWords).Replace(" ", "");
}
}
}