[Po4a-commits] po4a/lib/Locale/Po4a Man.pm,1.65,1.66

Nicolas FRAN??OIS po4a-devel@lists.alioth.debian.org
Sun, 14 Nov 2004 15:35:19 +0000


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

Modified Files:
	Man.pm 
Log Message:
When the argument of a .I or .B is provided on the next line, double
quotes (") were converted to \", which introduce groff comments.
They are now converted to \(dq (groff's double quote glyph), which is
converted back to " in pre_trans.
BTW, I'm adding some comments.


Index: Man.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Man.pm,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -d -r1.65 -r1.66
--- Man.pm	14 Nov 2004 01:05:02 -0000	1.65
+++ Man.pm	14 Nov 2004 15:35:16 -0000	1.66
@@ -294,7 +294,13 @@
         my ($l2,$r2)=$self->SUPER::shiftline();
         chomp($l2);
         if ($line =~ /^(\.[BI])\s*$/) {
-            $l2 =~ s/"/\\"/g;
+            # convert " to the groff's double quote glyph; it will be
+            # converted back to " in pre_trans. It is needed because
+            # otherwise, these quotes will be taken as arguments
+            # delimiters.
+            $l2 =~ s/"/\\(dq/g;
+            # append this line to the macro, with surrounding quotes, so
+            # that the line appear as an uniq argument.
             $line .= ' "'.$l2.'"';
         } else {
             $line =~ s/\\$//;
@@ -416,6 +422,7 @@
     # Groff bestiary
     $str =~ s/\\\*\(lq/``/sg;
     $str =~ s/\\\*\(rq/''/sg;
+    $str =~ s/\\\(dq/"/sg;
     # Change groff non-breaking space to ascii one
     $str =~ s|\\ |\xA0|sg;