[Po4a-commits] po4a/lib/Locale/Po4a Man.pm,1.60,1.61
Nicolas FRAN??OIS
po4a-devel@lists.alioth.debian.org
Fri, 12 Nov 2004 14:07:44 +0000
Update of /cvsroot/po4a/po4a/lib/Locale/Po4a
In directory haydn:/tmp/cvs-serv22995/lib/Locale/Po4a
Modified Files:
Man.pm
Log Message:
Lines containing only spaces are equivalent to empty lines.
Index: Man.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Man.pm,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -d -r1.60 -r1.61
--- Man.pm 12 Nov 2004 12:37:11 -0000 1.60
+++ Man.pm 12 Nov 2004 14:07:42 -0000 1.61
@@ -662,11 +662,13 @@
),$line,$ref)."\n";
}
- } elsif ($line =~ /^( +)([^.].*)/) {
+ } elsif ($line =~ /^( +)([^. ].*)/) {
+ # (Lines containing only spaces are handled as empty lines)
# Not a macro, but not a wrapped paragraph either
$wrapped_mode = $wrapped_mode eq 'YES' ? 'NO' : $wrapped_mode;
$paragraph .= $line."\n";
- } elsif ($line =~ /^([^.].*)/) {
+ } elsif ($line =~ /^([^.].*)/ && $line !~ /^ *$/) {
+ # (Lines containing only spaces are handled as empty lines)
# special case: the line is entirely a comment, keep the
# comment.
# NOTE: comment could also be found in the middle of a line.
@@ -679,7 +681,7 @@
}
# Not a macro
$paragraph .= $line."\n";
- } else { #empty line
+ } else { #empty line, or line containing only spaces
if ($paragraph) {
do_paragraph($self,$paragraph,$wrapped_mode);
$paragraph="";