Skip to content

Commit

Permalink
send-email: is_rfc2047_quoted use qr// regexes
Browse files Browse the repository at this point in the history
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Ævar Arnfjörð Bjarmason authored and Junio C Hamano committed Sep 30, 2010
1 parent 41ae8f1 commit 49f7385
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions git-send-email.perl
Original file line number Diff line number Diff line change
Expand Up @@ -852,8 +852,8 @@ sub quote_rfc2047 {

sub is_rfc2047_quoted {
my $s = shift;
my $token = '[^][()<>@,;:"\/?.= \000-\037\177-\377]+';
my $encoded_text = '[!->@-~]+';
my $token = qr/[^][()<>@,;:"\/?.= \000-\037\177-\377]+/;
my $encoded_text = qr/[!->@-~]+/;
length($s) <= 75 &&
$s =~ m/^(?:"[[:ascii:]]*"|=\?$token\?$token\?$encoded_text\?=)$/o;
}
Expand Down

0 comments on commit 49f7385

Please sign in to comment.