From 5263d08448482739a022a81431214d99ce435322 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Thu, 11 Jun 2020 15:23:32 -0700 Subject: [PATCH] Don't throw out punctuation when "canonizing" words This caused a pretty disastrous failure of the game when the team chose "Programming languages"; people submitted C, C++, and C#; and the word list they were presented for voting had only C# in it. --- empathy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/empathy.js b/empathy.js index 3a3f80d..cb69148 100644 --- a/empathy.js +++ b/empathy.js @@ -145,7 +145,7 @@ class Empathy extends Game { } canonize(word) { - return word.replace(/[^a-zA-Z0-9]/g, '').toLowerCase(); + return word.toLowerCase(); } compute_scores() { -- 2.43.0