Commit e20865f3 authored by IKEDA Soji's avatar IKEDA Soji
Browse files

Long email addresses in system messages may be folded.

Fixed by preventing folding words matching email regexp.
parent 8126e1a5
......@@ -123,10 +123,12 @@ sub wrap_text {
$cols = 78 unless defined $cols;
return $text unless $cols;
my $email_re = Sympa::Regexps::email();
$text = Text::LineFold->new(
Language => Sympa::Language->instance->get_lang,
OutputCharset => (Encode::is_utf8($text) ? '_UNICODE_' : 'utf8'),
Prep => 'NONBREAKURI',
prep => [qr{\b$email_re\b}, sub { shift; @_ }],
ColumnsMax => $cols
)->fold($init, $subs, $text);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment