Skip to content

Commit 7837dac

Browse files
committed
fix the regex to ensure the dashes are in front
1 parent 9b69134 commit 7837dac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/email_reply_parser.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def read(text)
133133

134134
private
135135
EMPTY = "".freeze
136-
SIGNATURE = '(?m)^(--|__|\w-$)|(^(\w+\s*){1,3} ym morf tneS$)'
136+
SIGNATURE = '(?m)(--\s*$|__\s*$|\w-$)|(^(\w+\s*){1,3} ym morf tneS$)'
137137

138138
begin
139139
require 're2'
@@ -152,7 +152,7 @@ def read(text)
152152
# Returns nothing.
153153
def scan_line(line)
154154
line.chomp!("\n")
155-
line.lstrip! unless SIG_REGEX.match(line)
155+
line.lstrip! unless SIG_REGEX.match(line)
156156

157157
# We're looking for leading `>`'s to see if this line is part of a
158158
# quoted Fragment.

0 commit comments

Comments
 (0)