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:
parent
e8eb665900
commit
3f218ebb52
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user