summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoridl0r <idl0r@gentoo.org>2009-05-02 12:17:14 +0000
committeridl0r <idl0r@gentoo.org>2009-05-02 12:17:14 +0000
commitc5c7f17a865c3bc6ff5a43a2da458e307d4ab22e (patch)
tree23df6044409697f3d945cb1f7c20162481192cc2
parentDon't eat newline, bug 264146. (diff)
downloadgentoolkit-c5c7f17a865c3bc6ff5a43a2da458e307d4ab22e.tar.gz
gentoolkit-c5c7f17a865c3bc6ff5a43a2da458e307d4ab22e.tar.bz2
gentoolkit-c5c7f17a865c3bc6ff5a43a2da458e307d4ab22e.zip
Fixed text_fill, \h is just available in perl >= 5.10 so use hex instead, thanks to ohnobinki.
svn path=/; revision=575
-rwxr-xr-xtrunk/src/echangelog/echangelog3
1 files changed, 1 insertions, 2 deletions
diff --git a/trunk/src/echangelog/echangelog b/trunk/src/echangelog/echangelog
index 9f9e365..66007fa 100755
--- a/trunk/src/echangelog/echangelog
+++ b/trunk/src/echangelog/echangelog
@@ -93,7 +93,6 @@ sub getenv($) {
# Copied from Text::Wrap.
# The only modified thing is:
# We trim _just_ tab/space etc. but not \n/\r.
-# So \h should cover \x09, \x0B, \x0C and \x20.
# \s treats even \n/\r as whitespace.
sub text_fill {
my ($ip, $xp, @raw) = @_;
@@ -101,7 +100,7 @@ sub text_fill {
my $pp;
for $pp ( split(/\n\s+/, join("\n", @raw)) ) {
- $pp =~ s/\h+/ /g;
+ $pp =~ s/[\x09|\x0B|\x0C|\x20]+/ /g;
my $x = Text::Wrap::wrap($ip, $xp, $pp);
push(@para, $x);
}