[Po4a-commits] "po4a/lib/Locale/Po4a Pod.pm,1.20,1.21"
Nicolas FRANCOIS
nekral-guest at alioth.debian.org
Tue Jun 13 19:57:19 UTC 2006
Update of /cvsroot/po4a/po4a/lib/Locale/Po4a
In directory haydn:/tmp/cvs-serv14649/lib/Locale/Po4a
Modified Files:
Pod.pm
Log Message:
Avoid embedded S<...>. The was the case in the translated bts.pl (devscripts):
"peut comprendre S<« S<# »>> comme un caractère de commentaire, donc il faudra"
Index: Pod.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Pod.pm,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- Pod.pm 13 Jun 2006 19:36:24 -0000 1.20
+++ Pod.pm 13 Jun 2006 19:57:17 -0000 1.21
@@ -54,9 +54,13 @@
$self->get_out_charset);
if (defined $enc_length) {
while ($str =~ m/(^|.*\s)(\S+?)\Q$nbs_out\E(\S+?)(\s.*$|$)/s) {
- $str = (defined $1)?$1:"";
- $str .= "S<$2 $3>";
- $str .= (defined $4)?$4:"";
+ my ($begin, $m1, $m2, $end) = ($1, $2, $3, $4);
+ $str = (defined $begin)?$begin:"";
+ # Remove the non-breaking spaces in the string that will be
+ # between S<...>
+ $m2 =~ s/\Q$nbs_out\E/ /g;
+ $str .= "S<$m1 $m2>";
+ $str .= (defined $end)?$end:"";
}
}
More information about the Po4a-commits
mailing list