From: Carl Worth Date: Sun, 14 Jun 2020 23:48:56 +0000 (-0700) Subject: Trim leading/trailing whitespace when canonizing words X-Git-Url: https://git.cworth.org/git?p=lmno-server;a=commitdiff_plain;h=04ad032a78078804c8f87b6e0cce071d71f873cd Trim leading/trailing whitespace when canonizing words We have a theory that this is what was causing otherwise identical-looking values to appear next to each other in the judging lists of recent games. --- diff --git a/empathy.js b/empathy.js index 79a0c44..b039a73 100644 --- a/empathy.js +++ b/empathy.js @@ -309,7 +309,7 @@ class Empathy extends Game { } canonize(word) { - return word.toLowerCase(); + return word.trim().toLowerCase(); } compute_scores() {