forked from GitHub/dbot
fix spelling bug with replacing parts of words instead of the word if the letter sequence occurs first
This commit is contained in:
parent
9b00578a60
commit
bb934fb1db
@ -17,7 +17,7 @@ var spelling = function(dbot) {
|
||||
|
||||
if(winnerDistance < 7) {
|
||||
if(winner !== correction) {
|
||||
var fix = last[data.channel][candidate].replace(winner, correction);
|
||||
var fix = last[data.channel][candidate].replace(' ' + winner + ' ', correction);
|
||||
if (/^.ACTION/.test(fix)) {
|
||||
fix = fix.replace(/^.ACTION/, '/me');
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user