Closed owenstone closed 7 months ago
How often do you think this issue happens? I worry about slowing down the guessing feature with unnecessary features, but if it's a real issue I'll merge it.
This addition is a common/standard companion to the trim operation. I don't think it will slow things down noticebly, as long as it isn't happening inside of a loop. I can look into it to try to quantify it, though.
Anecdotally, this has happened to me more than once. (I'm guessing that I'm physically jittering on the spacebar or going back to correct my spelling, and it could be more of an issue on mobile.) It can be hard to see why the guess isn't accepted, and if I'm not sure of that answer, I might assume it's totally wrong and not guess that one again.
Thanks for the feedback!
This replaces extra spaces in guessed name with only one space to aid matching.
The reason I chose to put this together in the same line with .trim() was because they both remove extra spaces, unlike the last lines that do domain-specific replacements.
Fixes: #122