Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Localise variable in pod-lower-headings()
  • Loading branch information
Paul Cochrane committed Feb 19, 2015
1 parent 4f93f87 commit 26f60cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Pod/Convenience.pm6
Expand Up @@ -98,9 +98,9 @@ sub pod-table(@contents) is export {
}

sub pod-lower-headings(@content, :$to = 1) is export {
my @new-content;
my $by = @content.first(Pod::Heading).level;
return @content unless $by > $to;
my @new-content;
for @content {
@new-content.push($_ ~~ Pod::Heading
?? Pod::Heading.new :level(.level - $by + $to) :contents[.contents]
Expand Down

0 comments on commit 26f60cd

Please sign in to comment.