[Po4a-commits] "po4a/lib/Locale/Po4a Man.pm,1.116,1.117"
Nicolas FRANCOIS
nekral-guest at alioth.debian.org
Sun Oct 30 20:04:31 UTC 2005
Update of /cvsroot/po4a/po4a/lib/Locale/Po4a
In directory haydn:/tmp/cvs-serv29774/lib/Locale/Po4a
Modified Files:
Man.pm
Log Message:
When a .B or .I (without argument) is followed by a .TP, we can insert a
\fB or \fI in the .IP argument, and forget the .B
(If this argument starts by a ", the \f must be inserted after this quote).
The same could be used for other macros, but .IP is responsible for most of
the "po4a does not support font modifiers followed by a command." failures.
This should not mess up the font stack.
Index: Man.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Man.pm,v
retrieving revision 1.116
retrieving revision 1.117
diff -u -d -r1.116 -r1.117
--- Man.pm 30 Oct 2005 15:58:25 -0000 1.116
+++ Man.pm 30 Oct 2005 20:04:29 -0000 1.117
@@ -586,10 +586,19 @@
my ($l2,$r2)=$self->SUPER::shiftline();
chomp($l2);
if ($line =~ /^(\.[BI])\s*$/) {
- if ($l2 =~ /^[.'][\t ]*([BIR]|BI|BR|IB|IR|RB|RI|SH|TP)[\t ]/) {
+ if ( $l2 =~ /^[.'][\t ]*([BIR]|BI|BR|IB|IR|RB|RI|SH|TP)[\t ]/
+ or $l2 =~ /^[.'][\t ]*([BIR])$/) {
# another font macro. Forget about the first one
$line = $l2;
$ref = $r2;
+ } elsif ($l2 =~ /^([.'][\t ]*(?:IP)[\t ]+"?)(.*)$/) {
+ # Install the font modifier into the next line
+ # after a possible quote (")
+ my $macro = $1;
+ my $arg = $2;
+ $line =~ /^\.([BI])\s*$/;
+ $line = $macro."\\f$1".$arg;
+ $ref = $r2;
} elsif ($l2 =~ /^[.']/) {
die wrap_ref_mod($ref, "po4a::man", dgettext("po4a",
"po4a does not support font modifiers followed by a ".
More information about the Po4a-commits
mailing list