process_docs.pl: When starting to read a new head1 section, remove previous text

Reviewed-by: Rich Salz <rsalz@openssl.org>
This commit is contained in:
Richard Levitte 2016-05-21 20:50:48 +02:00
parent eae029244d
commit e4860d531d

View File

@ -91,9 +91,10 @@ foreach my $subdir (keys %{$options{subdir}}) {
if (m|^head1=\s*(.*)|) {
$podinfo{lastsect} = $1;
$podinfo{lastsect} =~ s/\s+$//;
$podinfo{lastsecttext} = "";
}
next if (m|^=| || m|^\s*$|);
$podinfo{lastsecttext} .= " ";
$podinfo{lastsecttext} .= " " if $podinfo{lastsecttext};
$podinfo{lastsecttext} .= $_;
}
close $pod_fh;