[Po4a-commits] "po4a/lib/Locale/Po4a Man.pm,1.168,1.169"

Nicolas FRANCOIS nekral-guest at alioth.debian.org
Sun Jul 16 19:34:50 UTC 2006


Update of /cvsroot/po4a/po4a/lib/Locale/Po4a
In directory haydn:/tmp/cvs-serv3357/lib/Locale/Po4a

Modified Files:
	Man.pm 
Log Message:
Sometimes, we want real spaces, not non breaking spaces ('\ ').


Index: Man.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Man.pm,v
retrieving revision 1.168
retrieving revision 1.169
diff -u -d -r1.168 -r1.169
--- Man.pm	16 Jul 2006 19:26:32 -0000	1.168
+++ Man.pm	16 Jul 2006 19:34:48 -0000	1.169
@@ -646,7 +646,7 @@
             # To keep the space(s), we must introduce some \&
             @args = map { $_ =~ s/^(\s*)$/\\&$1\\&/s; $_ } @args;
             my $arg=join(" ", at args);
-            $arg =~ s/(\\&|\s)+$//;
+            $arg =~ s/(\\&|(?<!\\) )+$//;
             $arg =~ s/^ +//;
             this_macro_needs_args($macro,$ref,$arg);
             $line = "$insert_font\\f$macro".$arg."\\fR\n";
@@ -2124,7 +2124,7 @@
     my $macroarg = "";
     foreach (@_) {
         $macroarg.=" " if (length $macroarg);
-        if ($_ =~ m/\s/) {
+        if ($_ =~ m/((?<!\\) |\t)/) {
             $macroarg.="\"$_\"";
         } else {
             $macroarg.=$_;




More information about the Po4a-commits mailing list