Open owenstone opened 2 years ago
I tested this fix:
--- a/src/components/Guesser.tsx
+++ b/src/components/Guesser.tsx
@@ -53,7 +53,7 @@ export default function Guesser({
// Check territories function
function runChecks() {
const trimmedName = guessName
- .trim()
+ .replace(/\s+/g,' ').trim()
.toLowerCase()
.replace(/&/g, "and")
.replace(/^st\s/g, "st. ");
Seems a bit harsh that an extra space between words fails to be recognized. Example: "Saint Vincent and the Grenadines" (with two spaces between the words "Vincent" & "and" wasn't recognized and produced the "Invalid guess" response.
Expected: Extra whitespace where some whitespace is expected should be recognized as a valid entry.