From 0c2740478fbd74c482f18e8fec1ca6ef6c776d85 Mon Sep 17 00:00:00 2001 From: Duda Dornelles Date: Fri, 9 Jan 2015 09:58:08 -0200 Subject: Small refactoring on web_ui/viewHelper#quoteMail to use regex instad of split/map/join --- web-ui/app/js/helpers/view_helper.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'web-ui/app/js/helpers') diff --git a/web-ui/app/js/helpers/view_helper.js b/web-ui/app/js/helpers/view_helper.js index 83de4464..7173d8be 100644 --- a/web-ui/app/js/helpers/view_helper.js +++ b/web-ui/app/js/helpers/view_helper.js @@ -90,11 +90,7 @@ define( } function quoteMail(mail) { - var quotedLines = _.map(mail.textPlainBody.split('\n'), function (line) { - return '> ' + line; - }); - - return '\n\n' + quotedLines.join('\n'); + return '\n\n' + mail.textPlainBody.replace(/^/mg, '> '); } function i18n(text) { -- cgit v1.2.3