[Po4a-commits] po4a/lib/Locale/Po4a Man.pm,1.39,1.40
Martin Quinson
po4a-devel@lists.alioth.debian.org
Fri, 24 Sep 2004 13:44:39 +0000
Update of /cvsroot/po4a/po4a/lib/Locale/Po4a
In directory haydn:/tmp/cvs-serv10140
Modified Files:
Man.pm
Log Message:
recognize some (probably incorrect, but usual) comment lines [nekral]
Index: Man.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Man.pm,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- Man.pm 18 Aug 2004 01:20:28 -0000 1.39
+++ Man.pm 24 Sep 2004 13:44:37 -0000 1.40
@@ -658,10 +658,12 @@
# Special case: Don't change these lines
# .\" => comments
+ # ." => comments
# . => empty point on the line
# .tr abcd...
# => substitution like Perl's tr/ac/bd/ on output.
- if ($macro eq '\"' || $macro eq '' || $macro eq 'tr') {
+ if ($macro eq '\"' || $macro eq '' || $macro eq 'tr' ||
+ $macro eq '"') {
$self->pushline($line."\n");
goto LINE;
}
@@ -704,6 +706,16 @@
$wrapped_mode='NO';
$paragraph .= $line."\n";
} elsif ($line =~ /^([^.].*)/) {
+ # special case: the line is entirely a comment, keep the
+ # comment.
+ # NOTE: comment could also be found in the middle of a line.
+ # From info groff:
+ # Escape: \": Start a comment. Everything to the end of the
+ # input line is ignored.
+ if ($line =~ /^\\"/) {
+ $self->pushline($line."\n");
+ goto LINE;
+ }
# Not a macro
$paragraph .= $line."\n";
} else { #empty line