Skip to content

Commit

Permalink
Generalize 'toes' fix to also exlude 'woes', 'hoes', and 'does'
Browse files Browse the repository at this point in the history
  • Loading branch information
hangy committed Oct 27, 2021
1 parent 04cb809 commit 1ce1cd7
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
Expand Up @@ -373,7 +373,10 @@ public IEnumerator<object[]> GetEnumerator()
yield return new object[] { "", "" };

//Issue #1100
yield return new object[] { "doe", "does" };
yield return new object[] { "hoe", "hoes" };
yield return new object[] { "toe", "toes" };
yield return new object[] { "woe", "woes" };

//Issue 1132
yield return new object[] { "metadata", "metadata" };
Expand Down
2 changes: 1 addition & 1 deletion src/Humanizer/Inflections/Vocabularies.cs
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("(?<!^t)(o)es$", "$1");
_default.AddSingular("(?<!^[a-z])(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 1ce1cd7

Please sign in to comment.