3
0
mirror of https://github.com/reality/dbot.git synced 2024-12-24 19:52:36 +01:00

adding trim to link titles to remove annoying whitespace

This commit is contained in:
John Maguire 2013-03-18 21:50:10 -04:00
parent 133f04462e
commit 1ab10dcb04

View File

@ -16,7 +16,7 @@ var link = function(dbot) {
body = body.replace(/(\r\n|\n\r|\n)/gm, " ");
var title = body.valMatch(/<title>(.*)<\/title>/, 2);
if(title && title.length < 140) {
event.reply(ent.decode(title[1]));
event.reply(ent.decode(title[1]).trim());
}
}
});