From fc0fe6f5befff96b03200b6566e853d766d49dbc Mon Sep 17 00:00:00 2001 From: reality Date: Thu, 31 Mar 2016 22:00:55 +0000 Subject: [PATCH] fix --- modules/wikipedia/wikipedia.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/wikipedia/wikipedia.js b/modules/wikipedia/wikipedia.js index 7fe889d..31da2a2 100644 --- a/modules/wikipedia/wikipedia.js +++ b/modules/wikipedia/wikipedia.js @@ -63,7 +63,7 @@ var wikipedia = function(dbot) { body = _.filter(body, function(line) { var spaces = line.match(/\s/g); - return line != '' && !line.match(/{|}/) && !line.match(/^\s+$/) && !line.match(/^!/) && !line.match(/^#/) && !line.match(/^File:/) && !line.match(/^Image:/) && !line.match(/^Category:/) && !line.match(/http:\/\//) && !line.match(/^\s+?\|/) && !line.match(/:$/) && spaces && spaces.length > 5 && spaces.length < 100; + return line != '' && !line.match(/{|}/) && !line.match(/^\s+$/) && !line.match(/^!/) && !line.match(/^#/) && !line.match(/^File:/) && !line.match(/^Image:/) && !line.match(/^Category:/) && !line.match(/http:\/\//) && !line.match(/^\s*\|/) && !line.match(/:$/) && spaces && spaces.length > 5 && spaces.length < 100; }); if(random == true) { var sentence = body[_.random(0, body.length -1)];