diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/email/reply_parser.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/gitlab/email/reply_parser.rb b/lib/gitlab/email/reply_parser.rb index 7dedd5ec4aa..8c8dd1b9cef 100644 --- a/lib/gitlab/email/reply_parser.rb +++ b/lib/gitlab/email/reply_parser.rb @@ -13,7 +13,9 @@ module Gitlab encoding = body.encoding - body = EmailReplyTrimmer.trim(body) or return "" + body = EmailReplyTrimmer.trim(body) + + return '' unless body # not using /\s+$/ here because that deletes empty lines body = body.gsub(/[ \t]$/, '') |