Skip to content

Commit

Permalink
Remove last hard-tabs from Html.pm
Browse files Browse the repository at this point in the history
Signed-off-by: James E Keenan <jkeenan@cpan.org>
  • Loading branch information
jkeenan committed May 12, 2021
1 parent ebbb52e commit 62a1731
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions ext/Pod-Html/lib/Pod/Html.pm
Expand Up @@ -328,7 +328,6 @@ sub pod2html {
}
print $cache "$key $Pages{$key}\n";
}

close $cache or die "error closing $globals->{Dircache}: $!";
}

Expand Down Expand Up @@ -357,18 +356,18 @@ sub pod2html {
my $podtree = $parser->parse_file($input)->root;

unless(defined $globals->{Title}) {
if($podtree->[0] eq "Document" && ref($podtree->[2]) eq "ARRAY" &&
$podtree->[2]->[0] eq "head1" && @{$podtree->[2]} == 3 &&
ref($podtree->[2]->[2]) eq "" && $podtree->[2]->[2] eq "NAME" &&
ref($podtree->[3]) eq "ARRAY" && $podtree->[3]->[0] eq "Para" &&
@{$podtree->[3]} >= 3 &&
!(grep { ref($_) ne "" }
@{$podtree->[3]}[2..$#{$podtree->[3]}]) &&
(@$podtree == 4 ||
(ref($podtree->[4]) eq "ARRAY" &&
$podtree->[4]->[0] eq "head1"))) {
$globals->{Title} = join("", @{$podtree->[3]}[2..$#{$podtree->[3]}]);
}
if($podtree->[0] eq "Document" && ref($podtree->[2]) eq "ARRAY" &&
$podtree->[2]->[0] eq "head1" && @{$podtree->[2]} == 3 &&
ref($podtree->[2]->[2]) eq "" && $podtree->[2]->[2] eq "NAME" &&
ref($podtree->[3]) eq "ARRAY" && $podtree->[3]->[0] eq "Para" &&
@{$podtree->[3]} >= 3 &&
!(grep { ref($_) ne "" }
@{$podtree->[3]}[2..$#{$podtree->[3]}]) &&
(@$podtree == 4 ||
(ref($podtree->[4]) eq "ARRAY" &&
$podtree->[4]->[0] eq "head1"))) {
$globals->{Title} = join("", @{$podtree->[3]}[2..$#{$podtree->[3]}]);
}
}

$globals->{Title} //= "";
Expand Down

0 comments on commit 62a1731

Please sign in to comment.