[Po4a-commits] "po4a/lib/Locale/Po4a Man.pm,1.214,1.215"

Denis Barbier barbier-guest at alioth.debian.org
Sat Aug 14 10:58:12 UTC 2010


Update of /cvsroot/po4a/po4a/lib/Locale/Po4a
In directory alioth:/tmp/cvs-serv17396/lib/Locale/Po4a

Modified Files:
	Man.pm 
Log Message:
Fix handling of escaped spaces in post_trans

 a. Trailing spaces must not be removed if they are escaped.
 b. In order to avoid extra space, newlines were removed if
they follow an escaped space.  This removal must not be
performed on the last newline, otherwise paragraphs are merged
in the manual page.


Index: Man.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Man.pm,v
retrieving revision 1.214
retrieving revision 1.215
diff -u -d -r1.214 -r1.215
--- Man.pm	28 Jul 2010 21:43:57 -0000	1.214
+++ Man.pm	14 Aug 2010 10:58:09 -0000	1.215
@@ -1065,7 +1065,7 @@
     $str =~ s/\Q$nbs_out/\\ /sg if defined $nbs_out;
     # No nbsp (said "\ " in groff on the last pos of the line, or groff adds
     # an extra space
-    $str =~ s/\\ \n/\\ /sg;
+    $str =~ s/\\ \n(?:.)/\\ /sg;
 
     # Make sure we compute internal sequences right.
     # think about: B<AZE E<lt> EZA E<gt>>
@@ -1158,7 +1158,7 @@
         $str = $tmp.$str;
     }
     if (not defined $self->{type}) {
-        $str =~ s/ $//mg;
+        $str =~ s/(?<!\\) $//mg;
     }
 
     print STDERR "$str\n" if ($debug{'postrans'});




More information about the Po4a-commits mailing list