summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/spreed.c11
-rw-r--r--test.txt1
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;
diff --git a/test.txt b/test.txt
index ed00213..207eb45 100644
--- a/test.txt
+++ b/test.txt
@@ -1,4 +1,5 @@
this ain't workin.
+https://google.com
1
22
333