Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Projets publics
Sympa
Commits
51ab24f7
Unverified
Commit
51ab24f7
authored
Dec 18, 2018
by
IKEDA Soji
Committed by
GitHub
Dec 18, 2018
Browse files
Merge pull request #505 from ikedas/issue-502 by ikedas
Long email addresses in system messages may be folded #502
parents
f6b4261e
27154374
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lib/Sympa/Tools/Text.pm
View file @
51ab24f7
...
...
@@ -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
=>
[
$email_re
,
sub
{
shift
;
@
_
}],
ColumnsMax
=>
$cols
)
->
fold
(
$init
,
$subs
,
$text
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment