diff options
| -rwxr-xr-x | src/spreed.c | 11 | ||||
| -rw-r--r-- | test.txt | 1 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/spreed.c b/src/spreed.c index 406c288..0ec2971 100755 --- a/src/spreed.c +++ b/src/spreed.c @@ -172,8 +172,15 @@ END_OF_WORD: fflush(stdout); - if (word[iword-1] == L'.') { - cooldown += wpm_ns; + while (iword > 0) { + if (iswalnum(word[iword-1])) { + break; + } + if (word[iword-1] == L'.' || word[iword-1] == L'!' || word[iword-1] == L'?') { + cooldown += wpm_ns; + break; + } + iword--; } cooldown += wpm_ns; @@ -1,4 +1,5 @@ this ain't workin. +https://google.com 1 22 333 |
