Fixed double punctuation in attack. Resolves #2

This commit is contained in:
raeleus 2024-09-22 23:53:38 -07:00
parent 87b3485069
commit 99bbd4fe5a
2 changed files with 5 additions and 1 deletions

View file

@ -400,4 +400,8 @@ function toTitleCase(str) {
/\w\S*/g,
text => text.charAt(0).toUpperCase() + text.substring(1).toLowerCase()
);
}
function stripPunctuation(str) {
return str.replaceAll(/((\.)|(!))\s*$/g, "")
}