From 5cc234d0377c35ae17b82788f18671fdf1589852 Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Sat, 31 Oct 2015 02:48:06 +0100 Subject: [PATCH] Remove unwanted whitespace in peer name --- scripts/doge.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/doge.coffee b/scripts/doge.coffee index 1d68422..f620e22 100644 --- a/scripts/doge.coffee +++ b/scripts/doge.coffee @@ -54,7 +54,7 @@ module.exports = (robot) -> regex = /\[(.+)\] (.+) [>«»]+ ((?:(?!\n(\[|\d))[\s\S])+)/g parse_line = (x) -> date: x[1] - peer: x[2].replace chat + ' ', '' + peer: x[2].replace(chat, '').trim() text: x[3].trim().replace '\n', ' ' run_command "history #{chat} #{size}", (lines) -> callback ((match_all regex, lines.join '\n').map parse_line)