Invalid words bug
If you use a word that is not allowed (for example, ironically, the word application), you can press a character (space, period, etc.) and start a new word afterwards, that old word remains
Same with tilda. "NARWHAL~ " is a valid word.
I was thinking of creating a function that will just check the string if it has a character that is not a letter, which would then return false to the function that checks the word itself.
I submitted a possible solution. I'm pretty sure it works (logically at least), but at least the idea is still there.
That pull request was not Swift :)
If anyone wants to think about a solution for this one, this may be the way to approach it;
- Is the character to the right of the word a punctuation character? If so, delete it.
- Is the character to the right of the word a space? If so, is the character to the right of the space either EOF or space? If so, delete the space.