File tree Expand file tree Collapse file tree 3 files changed +25
-2
lines changed Expand file tree Collapse file tree 3 files changed +25
-2
lines changed Original file line number Diff line number Diff line change @@ -147,9 +147,9 @@ def scan_line(line)
147147 line . chomp! ( "\n " )
148148 line . lstrip! unless SIG_REGEX . match ( line )
149149
150- # We're looking for leading `>`'s to see if this line is part of a
150+ # We're looking for a leading `>` to see if this line is part of a
151151 # quoted Fragment.
152- is_quoted = !!( line =~ /(>+ )$/ )
152+ is_quoted = !!( line =~ /(>)$/ )
153153
154154 # Mark the current Fragment as a signature if the current line is empty
155155 # and the Fragment starts with a common signature indicator.
Original file line number Diff line number Diff line change 22require 'test/unit'
33require 'pathname'
44require 'pp'
5+ require 'timeout'
56
67dir = Pathname . new File . expand_path ( File . dirname ( __FILE__ ) )
78require dir + '..' + 'lib' + 'email_reply_parser'
@@ -222,6 +223,12 @@ def test_doesnt_remove_signature_delimiter_in_mid_line
222223 assert_equal 1 , reply . fragments . size
223224 end
224225
226+ def test_long_quote_processing_completes
227+ reply = Timeout . timeout ( 1 ) { email ( :email_long_quote ) }
228+
229+ assert_equal 5 , reply . fragments . size
230+ end
231+
225232 def email ( name )
226233 body = IO . read EMAIL_FIXTURE_PATH . join ( "#{ name } .txt" ) . to_s
227234 EmailReplyParser . read body
Load Diff Large diffs are not rendered by default.
You can’t perform that action at this time.
0 commit comments