Author: idl0r
Date: 2009-05-02 12:17:14 +0000 (Sat, 02 May 2009)
New Revision: 575
Modified:
trunk/src/echangelog/echangelog
Log:
Fixed text_fill, \h is just available in perl >= 5.10 so use hex instead, thanks to ohnobinki.
Modified: trunk/src/echangelog/echangelog
===================================================================
--- trunk/src/echangelog/echangelog 2009-05-01 22:30:00 UTC (rev 574)
+++ trunk/src/echangelog/echangelog 2009-05-02 12:17:14 UTC (rev 575)
@@ -93,7 +93,6 @@
# 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 @@
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);
}
|