Improve the checking of pod sections

(i.e. remove some bugs)

Reviewed-by: Rich Salz <rsalz@openssl.org>
This commit is contained in:
Richard Levitte 2016-05-23 00:36:37 +02:00
parent beadb44157
commit c4d598939a

View file

@ -87,8 +87,10 @@ foreach my $subdir (keys %{$options{subdir}}) {
print STDERR "Found section number $1\n" if $options{debug};
$podinfo{section} = $1;
}
last if m|^=head1| && defined $podinfo{lastsect} eq "NAME";
if (m|^head1=\s*(.*)|) {
last if (m|^=head1|
&& defined $podinfo{lastsect}
&& $podinfo{lastsect} eq "NAME");
if (m|^=head1\s*(.*)|) {
$podinfo{lastsect} = $1;
$podinfo{lastsect} =~ s/\s+$//;
$podinfo{lastsecttext} = "";