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

Fix 'toes' being singularized to 'to' #1136

Merged
merged 3 commits into from Oct 27, 2021
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/Humanizer.Tests.Shared/InflectorTests.cs
Expand Up @@ -372,6 +372,13 @@ public IEnumerator<object[]> GetEnumerator()
yield return new object[] { "ex", "exes" };
yield return new object[] { "", "" };

//Issue #1100
yield return new object[] { "doe", "does" };
yield return new object[] { "hoe", "hoes" };
yield return new object[] { "toe", "toes" };
hangy marked this conversation as resolved.
Show resolved Hide resolved
yield return new object[] { "woe", "woes" };
yield return new object[] { "potato", "potatoes" };

//Issue 1132
yield return new object[] { "metadata", "metadata" };
}
hazzik marked this conversation as resolved.
Show resolved Hide resolved
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("(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