1 |
Author: idl0r |
2 |
Date: 2009-05-02 12:17:14 +0000 (Sat, 02 May 2009) |
3 |
New Revision: 575 |
4 |
|
5 |
Modified: |
6 |
trunk/src/echangelog/echangelog |
7 |
Log: |
8 |
Fixed text_fill, \h is just available in perl >= 5.10 so use hex instead, thanks to ohnobinki. |
9 |
|
10 |
Modified: trunk/src/echangelog/echangelog |
11 |
=================================================================== |
12 |
--- trunk/src/echangelog/echangelog 2009-05-01 22:30:00 UTC (rev 574) |
13 |
+++ trunk/src/echangelog/echangelog 2009-05-02 12:17:14 UTC (rev 575) |
14 |
@@ -93,7 +93,6 @@ |
15 |
# Copied from Text::Wrap. |
16 |
# The only modified thing is: |
17 |
# We trim _just_ tab/space etc. but not \n/\r. |
18 |
-# So \h should cover \x09, \x0B, \x0C and \x20. |
19 |
# \s treats even \n/\r as whitespace. |
20 |
sub text_fill { |
21 |
my ($ip, $xp, @raw) = @_; |
22 |
@@ -101,7 +100,7 @@ |
23 |
my $pp; |
24 |
|
25 |
for $pp ( split(/\n\s+/, join("\n", @raw)) ) { |
26 |
- $pp =~ s/\h+/ /g; |
27 |
+ $pp =~ s/[\x09|\x0B|\x0C|\x20]+/ /g; |
28 |
my $x = Text::Wrap::wrap($ip, $xp, $pp); |
29 |
push(@para, $x); |
30 |
} |