diff --git a/lib/gitlab/email/reply_parser.rb b/lib/gitlab/email/reply_parser.rb index 7dedd5ec4aacc889826b9e105204c30e09be7612..8c8dd1b9cef492395cd0d216d2b8d3a9c3200885 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]$/, '')