Skip to content

Commit

Permalink
fix: Don't include 'toes' when applying the 'heroes'-rule for singula…
Browse files Browse the repository at this point in the history
…rization
  • Loading branch information
hangy committed Oct 27, 2021
1 parent 7584e38 commit 04cb809
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/Humanizer.Tests.Shared/InflectorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,9 @@ public IEnumerator<object[]> GetEnumerator()
yield return new object[] { "ex", "exes" };
yield return new object[] { "", "" };

//Issue #1100
yield return new object[] { "toe", "toes" };

//Issue 1132
yield return new object[] { "metadata", "metadata" };
}
Expand Down
2 changes: 1 addition & 1 deletion src/Humanizer/Inflections/Vocabularies.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ private static Vocabulary BuildDefault()
_default.AddSingular("(m)ovies$", "$1ovie");
_default.AddSingular("(x|ch|ss|sh)es$", "$1");
_default.AddSingular("(^[m|l])ice$", "$1ouse");
_default.AddSingular("(o)es$", "$1");
_default.AddSingular("(?<!^t)(o)es$", "$1");
_default.AddSingular("(shoe)s$", "$1");
_default.AddSingular("(cris|ax|test)es$", "$1is");
_default.AddSingular("(octop|vir|alumn|fung|cact|foc|hippopotam|radi|stimul|syllab|nucle)i$", "$1us");
Expand Down

0 comments on commit 04cb809

Please sign in to comment.