Merge pull request #494 from Klotske/fix-word-count

#492 - Add regex word counter
This commit is contained in:
AbdBarho
2023-01-07 18:06:25 +01:00
committed by GitHub
@@ -12,7 +12,7 @@ interface TrackedTextboxProps {
}
export const TrackedTextarea = (props: TrackedTextboxProps) => {
const wordCount = props.text.split(" ").length - 1;
const wordCount = (props.text.match(/\w+/g) || []).length;
let progressColor: string;
switch (true) {