Skip to content

Commit 005be7e

Browse files
committed
POD: Create anchor for every =item directive
Setting anchor_items to true is needed for creating link to specific =item directive. By default Pod::Simple::XHTML module does not enable it. Webpage https://metacpan.org/ for POD documentation has it already enabled and linking to =item directive is working fine. Lot of POD documents already link to =item directives and without setting anchor_items to true documents are semi-broken on GitHub.
1 parent 08ea2aa commit 005be7e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/github/commands/pod2html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ my $p = Pod::Simple::XHTML->new;
77
$p->html_header('');
88
$p->html_footer('');
99
$p->perldoc_url_prefix('https://metacpan.org/pod/');
10+
$p->anchor_items(1);
1011
$p->strip_verbatim_indent(sub {
1112
my $lines = shift;
1213
(my $indent = $lines->[0]) =~ s/\S.*//;

0 commit comments

Comments
 (0)