Skip to content
This repository has been archived by the owner on Oct 7, 2024. It is now read-only.

Fix some irregular pluralizations #73

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AndrewRadev
Copy link

@AndrewRadev AndrewRadev commented Sep 23, 2019

What it does:

Fixes the pluralization of "people" to "person" instead of "personople".

Why it does it:

Submatch 1 was the entire group starting with (\w* and wrapping the whole word. Moving the closing bracket to limit submatch 1 to just the \w*pe part seems to avoid the problem. There might be alternative fixes (get the second group rather than the first in some cases?), but I've tried to patch the problem with minimal changes to avoid causing unrelated bugs.

I've also added a few more tests, but I feel like pluralization in particular could use a lot more testing, just in case. It's one of those things that feel like they have a lot of edge cases that might break with changes to the rules.

Without this fix, "people" was pluralized to "personople", because
submatch 1 was the entier group starting with `(\w*`. Moving the closing
bracket to limit submatch 1 seems to avoid this particular issue.
@winstonewert
Copy link

I just came across this issue myself with "person" becoming "personople"

Sadly, it doesn't look like any action is happening to incorporate this fix.

@mainrs
Copy link

mainrs commented Sep 22, 2020

The author hasn't been on GitHub for more than a year now. Sad that such useful crates kind of get lost. Do other people than @whatisinternet have push access (and publishing rights)?

@sezna
Copy link

sezna commented Aug 28, 2021

@mainrs I have a dependency on this crate, so I've forked it and am making updates there. I'll bring in this PR as well as a few others.

@droundy
Copy link

droundy commented Dec 16, 2021

@sezna can you share where your fork is?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants