Address a bug in the word counter regex

This commit is contained in:
Samuel Janda 2024-01-14 18:21:27 +11:00
commit 20656170d0

View file

@ -128,7 +128,7 @@
if (counter === "char") {
count = value.length;
} else if (counter === "word") {
count = value.split(/\b/).length - 1;
count = value.split(/\b\w+\b/).length - 1;
}
};