[Po4a-commits] po4a/lib/Locale/Po4a Man.pm,1.43,1.44
Martin Quinson
po4a-devel@lists.alioth.debian.org
Fri, 24 Sep 2004 14:06:06 +0000
Update of /cvsroot/po4a/po4a/lib/Locale/Po4a
In directory haydn:/tmp/cvs-serv10899
Modified Files:
Man.pm
Log Message:
Fix debian's #268904, which I don't really understand [nekral]
Index: Man.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Man.pm,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -d -r1.43 -r1.44
--- Man.pm 24 Sep 2004 14:03:27 -0000 1.43
+++ Man.pm 24 Sep 2004 14:06:04 -0000 1.44
@@ -497,10 +497,13 @@
if ($line =~ /^\./) {
die sprintf("po4a::man: ".dgettext("po4a","Unparsable line: %s"),$line)."\n"
- unless ($line =~ /^\.+\\*?(\\\")(.*)/ ||
- $line =~ /^\.([BI])(\W.*)/ ||
- $line =~ /^\.(\S*)(.*)/);
- my $macro=$1;
+ unless ($line =~ /^(\.+\\*?)(\\\")(.*)/ ||
+ $line =~ /^(\.)([BI])(\W.*)/ ||
+ $line =~ /^(\.)(\S*)(.*)/);
+ my $arg1=$1;
+ $arg1 .= $2;
+ my $macro=$2;
+ my $arguments=$3;
# Split on spaces for arguments, but not spaces within double quotes
my @args=();
@@ -510,9 +513,12 @@
# We change them back before pushing into the arguments. The one which will be
# translated will have the same change again (in pre_trans and post_trans), but
# the ones which won't get translated are not changed anymore. Let's play safe.
- $line =~ s/\\ /\xA0/g;
+ $line =~ s/\\ /\xA0/g;
+ $arguments =~ s/\\ /\xA0/g;
+# $arguments =~ s/^ +//;
+ push @args,$arg1;
- foreach my $elem (split (/ +/,$line)) {
+ foreach my $elem (split (/ +/,$arguments)) {
print STDERR ">>Seen $elem(buffer=$buffer;esc=$escaped)\n"
if ($debug{'splitargs'});