Be more certain in the comment

This commit is contained in:
http://jneen.net/ 2016-12-13 12:15:42 -08:00
parent f02f238d52
commit 1b8a576d3f
1 changed files with 3 additions and 2 deletions

View File

@ -18,8 +18,9 @@ module Gitlab
# not using /\s+$/ here because that deletes empty lines # not using /\s+$/ here because that deletes empty lines
body = body.gsub(/[ \t]$/, '') body = body.gsub(/[ \t]$/, '')
# TODO [jneen]: do we want to allow empty-quoting? (replies only containing a blockquote) # NOTE: We currently don't support empty quotes.
# EmailReplyTrimmer allows this as a special case, so we detect it manually here. # EmailReplyTrimmer allows this as a special case,
# so we detect it manually here.
return "" if body.lines.all? { |l| l.strip.empty? || l.start_with?('>') } return "" if body.lines.all? { |l| l.strip.empty? || l.start_with?('>') }
body.force_encoding(encoding).encode("UTF-8") body.force_encoding(encoding).encode("UTF-8")