summaryrefslogtreecommitdiff
path: root/Master/tlpkg/TeXLive/TLPSRC.pm
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-03-07 22:55:02 +0000
committerKarl Berry <karl@freefriends.org>2020-03-07 22:55:02 +0000
commit7a201df902af46299e1be728b291fda8ccc3cdd9 (patch)
tree4f7c336627212670db4f5ebd6bc2c3855b2f06f4 /Master/tlpkg/TeXLive/TLPSRC.pm
parent11c6e5fc65f26ba5219997d19707b998a9abf26d (diff)
TLPSRC.pm (from_file),
TeXCatalogue.pm (beautify): collapse multiple whitespace. (Still on the quest for identical longdesc results from our various sources.) git-svn-id: svn://tug.org/texlive/trunk@54167 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/TeXLive/TLPSRC.pm')
-rw-r--r--Master/tlpkg/TeXLive/TLPSRC.pm16
1 files changed, 8 insertions, 8 deletions
diff --git a/Master/tlpkg/TeXLive/TLPSRC.pm b/Master/tlpkg/TeXLive/TLPSRC.pm
index 4a461a8fa13..66c3aed24fc 100644
--- a/Master/tlpkg/TeXLive/TLPSRC.pm
+++ b/Master/tlpkg/TeXLive/TLPSRC.pm
@@ -232,14 +232,14 @@ sub from_file {
die "Cannot deduce name from file argument and name tag not found";
}
#
- # We should probably call TeXCatalogue::beautify(), but trailing
- # whitespace seems to be the only thing that comes up in practice. We
- # want the parsing from .tlpsrc to result in exactly the same string,
- # including spaces, as parsing from texlive.tlpdb. Otherwise
- # tl-update-tlpdb's tlpdb_catalogue_compare will think the strings
- # are always different.
- $shortdesc =~ s/\s+$//g;
- $longdesc =~ s/\s+$//g;
+ # We should call TeXCatalogue::beautify(), but let's be lazy since not
+ # everything comes up in practice. We want the parsing from .tlpsrc to
+ # result in exactly the same string, including spaces, as parsing from
+ # texlive.tlpdb. Otherwise tl-update-tlpdb's tlpdb_catalogue_compare
+ # will think the strings are always different.
+ $shortdesc =~ s/\s+$//g; # rm trailing whitespace (shortdesc)
+ $longdesc =~ s/\s+$//g; # rm trailing whitespace (longdesc)
+ $longdesc =~ s/\s\s+/ /g; # collapse multiple whitespace characters to one
#
$self->name($name);
$self->category($category);