Skip to content

Commit

Permalink
Pass through the content of the "Letter, other" Unicode category.
Browse files Browse the repository at this point in the history
  • Loading branch information
hangy committed Jul 31, 2016
1 parent 2f77816 commit 65e123f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/Humanizer.Tests.Shared/StringHumanizeTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ public void CanHumanizeStringInPascalCaseInTurkish(string input, string expected
Assert.Equal(expectedResult, input.Humanize());
}

[Theory, UseCulture("ar")]
[InlineData("جمهورية ألمانيا الاتحادية", "جمهورية ألمانيا الاتحادية")]
public void CanHumanizeOtherUnicodeLetter(string input, string expectedResult)
{
Assert.Equal(expectedResult, input.Humanize());
}

[Theory]
[InlineData("Underscored_input_string_is_turned_into_sentence", "Underscored input string is turned into sentence")]
[InlineData("Underscored_input_String_is_turned_INTO_sentence", "Underscored input String is turned INTO sentence")]
Expand Down
2 changes: 1 addition & 1 deletion src/Humanizer/StringHumanizeExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public static class StringHumanizeExtensions

static StringHumanizeExtensions()
{
PascalCaseWordPartsRegex = new Regex(@"[\p{Lu}]?[\p{Ll}]+|[0-9]+[\p{Ll}]*|[\p{Lu}]+(?=[\p{Lu}][\p{Ll}]|[0-9]|\b)",
PascalCaseWordPartsRegex = new Regex(@"[\p{Lu}]?[\p{Ll}]+|[0-9]+[\p{Ll}]*|[\p{Lu}]+(?=[\p{Lu}][\p{Ll}]|[0-9]|\b)|[\p{Lo}]+",
RegexOptions.IgnorePatternWhitespace | RegexOptions.ExplicitCapture | RegexOptionsUtil.Compiled);
FreestandingSpacingCharRegex = new Regex(@"\s[-_]|[-_]\s", RegexOptionsUtil.Compiled);
}
Expand Down

0 comments on commit 65e123f

Please sign in to comment.