Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit a2af890

Browse files
committedJul 19, 2022
buildtoc - fix inner links when generating perltoc.pod
When generating perltoc.pod, the headings taken from all of the various pod documents included in core. These headings can have arbitrary content, including links. A link with a second but without a name won't work once it's moved into the perltoc.pod file, so convert any links like this to include the name of the pod document they are being taken from.
1 parent ee17861 commit a2af890

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed
 

‎pod/buildtoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,8 @@ sub podset {
237237
s/^\s*\*\s*//;
238238
s/\n/ /g;
239239
s/\s+$//;
240+
# make sure inner links include the target page
241+
s{L<(?:[^|>]+\|)?\K/}{$pod/}g;
240242
next if /^[\d.]+$/;
241243
next if $pod eq 'perlmodlib' && /^ftp:/;
242244
$OUT .= ", " if $initem;

0 commit comments

Comments
 (0)
Please sign in to comment.