3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-24 04:49:25 +01:00

Make spelling distance check not care about case.

This commit is contained in:
Psychedelic Squid 2012-03-21 02:53:54 +08:00 committed by Luke Slater
parent e8eb665900
commit 3f218ebb52

View File

@ -12,7 +12,7 @@ var spelling = function(dbot) {
var winnerDistance = Infinity;
for(var i=0;i<candidates.length;i++) {
var distance = String.prototype.distance(correction, candidates[i]);
var distance = String.prototype.distance(correction.toLowerCase(), candidates[i].toLowerCase());
if((distance < winnerDistance) && (distance > 0)) {
winner = candidates[i];
winnerDistance = distance;