cleartext-mac icon indicating copy to clipboard operation
cleartext-mac copied to clipboard

Invalid words bug

Open schlomok opened this issue 9 years ago • 5 comments

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

schlomok avatar Apr 06 '16 19:04 schlomok

Same with tilda. "NARWHAL~ " is a valid word.

clickthisnick avatar Apr 07 '16 00:04 clickthisnick

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.

gendium avatar Apr 21 '16 13:04 gendium

I submitted a possible solution. I'm pretty sure it works (logically at least), but at least the idea is still there.

gendium avatar Apr 28 '16 21:04 gendium

That pull request was not Swift :)

mortenjust avatar Jun 07 '16 20:06 mortenjust

If anyone wants to think about a solution for this one, this may be the way to approach it;

  1. Is the character to the right of the word a punctuation character? If so, delete it.
  2. 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.

mortenjust avatar Jun 08 '16 04:06 mortenjust