forked from GitHub/dbot
adding trim to link titles to remove annoying whitespace
This commit is contained in:
parent
133f04462e
commit
1ab10dcb04
@ -16,7 +16,7 @@ var link = function(dbot) {
|
|||||||
body = body.replace(/(\r\n|\n\r|\n)/gm, " ");
|
body = body.replace(/(\r\n|\n\r|\n)/gm, " ");
|
||||||
var title = body.valMatch(/<title>(.*)<\/title>/, 2);
|
var title = body.valMatch(/<title>(.*)<\/title>/, 2);
|
||||||
if(title && title.length < 140) {
|
if(title && title.length < 140) {
|
||||||
event.reply(ent.decode(title[1]));
|
event.reply(ent.decode(title[1]).trim());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user