Open AndrewRadev opened 5 years ago
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.
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)?
@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.
@sezna can you share where your fork is?
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.