syntax is important

This commit is contained in:
reality 2013-12-27 16:35:42 +00:00
parent b008f28406
commit e0c2ec36f8

View File

@ -17,7 +17,8 @@ var words = function(dbot) {
var query = event.params[1]; var query = event.params[1];
this.wn.etymologies(encodeURIComponent(query), function(err, defs) { this.wn.etymologies(encodeURIComponent(query), function(err, defs) {
if(!err && defs[0]) { if(!err && defs[0]) {
event.reply(query + ' etymology: ' + defs[0].replace(/<\/?[^>]+(>|$)/g, ""); event.reply(query + ' etymology: ' +
defs[0].replace(/<\/?[^>]+(>|$)/g, ""));
} else { } else {
event.reply('No etymology found for ' + query); event.reply('No etymology found for ' + query);
} }