Skip to content

Commit

Permalink
Merge pull request #320 from Borzoo/dehumanizeHumanizeBug
Browse files Browse the repository at this point in the history
fixes issue #319
  • Loading branch information
MehdiK committed Aug 1, 2014
2 parents 63ba28d + 8c7eccd commit b53b431
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
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(" ", "");
}
}
}

0 comments on commit b53b431

Please sign in to comment.