]> git.cworth.org Git - lmno-server/blobdiff - empathy.js
Don't throw out punctuation when "canonizing" words
[lmno-server] / empathy.js
index 3a3f80de007e6eab8a0b855a8a4f908d6b834d45..cb691485c0e928ccef8ae4cf9ac0e478877a74ce 100644 (file)
@@ -145,7 +145,7 @@ class Empathy extends Game {
   }
 
   canonize(word) {
-    return word.replace(/[^a-zA-Z0-9]/g, '').toLowerCase();
+    return word.toLowerCase();
   }
 
   compute_scores() {