Skip to content

Commit

Permalink
fix the regex to ensure the dashes are in front
Browse files Browse the repository at this point in the history
  • Loading branch information
technoweenie committed May 30, 2014
1 parent 9b69134 commit 7837dac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/email_reply_parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def read(text)

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

begin
require 're2'
Expand All @@ -152,7 +152,7 @@ def read(text)
# Returns nothing.
def scan_line(line)
line.chomp!("\n")
line.lstrip! unless SIG_REGEX.match(line)
line.lstrip! unless SIG_REGEX.match(line)

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

1 comment on commit 7837dac

@anaulin
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing that!

Please sign in to comment.