tags 786642 patch
thanks

Hi,

David Prévot pisze:
> 
> It might be related to the change introduced to fix #744366, thus
> X-D-CCing Robert who proposed the initial patch (and may have a clear
> view about what is going on).

Yes, it's my fault, thanks for pointing this out.


> manpages-fr-extra package, and built with po4a 0.45), currently starts
> with:
> .\"  Setup ////////////////////////////////////////////////////////////////
> [skipped]
> When building the same page with the latest po4a (0.46), the translated
> top.1 man page starts with:
> \"  Setup ////////////////////////////////////////////////////////////////

The bug lies in the following fragment of Man.pm code:
         if ($line =~ m/^[.']*$/) {
             if ($c !~ m/^\s+$/) {
                 # This commentted line may be comment for the next
paragraph
                 push @next_comments, [substr($line,0,1),$c];

While adding the above substr() call in my previous patch, I failed to
notice that $line might be actually empty. The attached patch fixes this
oversight.

Regards,
robert







Index: lib/Locale/Po4a/Man.pm
===================================================================
--- lib/Locale/Po4a/Man.pm	(wersja 2777)
+++ lib/Locale/Po4a/Man.pm	(kopia robocza)
@@ -686,8 +686,8 @@
 
         if ($line =~ m/^[.']*$/) {
             if ($c !~ m/^\s+$/) {
-                # This commentted line may be comment for the next paragraph
-                push @next_comments, [substr($line,0,1),$c];
+                # This commented line may be comment for the next paragraph
+                push @next_comments, [$line ? substr($line,0,1) : '.', $c];
             }
             if ($line =~ m/^[.']+$/) {
                 # those lines are ignored

Reply via email to