diff options
author | Duda Dornelles <dudassdornelles@gmail.com> | 2015-01-09 09:58:08 -0200 |
---|---|---|
committer | Pixpoa pairing <pixpoapairing@pixelated-project.org> | 2015-01-09 09:59:35 -0200 |
commit | 0c2740478fbd74c482f18e8fec1ca6ef6c776d85 (patch) | |
tree | d0fd58a35d4cbb0a2eea7db881d5097addbe00c2 | |
parent | 21153d9310aeb7962c4e03be83464633f38ca166 (diff) |
Small refactoring on web_ui/viewHelper#quoteMail to use regex instad of split/map/join
-rw-r--r-- | web-ui/app/js/helpers/view_helper.js | 6 |
1 files changed, 1 insertions, 5 deletions
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) { |