diff options
author | Graham Knop <haarg@haarg.org> | 2022-07-18 14:41:56 +0200 |
---|---|---|
committer | Graham Knop <haarg@haarg.org> | 2022-07-20 11:37:13 +0200 |
commit | 335b0be874e6d4a7fc6ec34bba7e131ba23ce3a2 (patch) | |
tree | 4079b4347f22e6a4956d20e08d2d841f5eea101f /pod/buildtoc | |
parent | b7d47e3a5f074b49fcfa68341708db3e5ca50b55 (diff) | |
download | perl-335b0be874e6d4a7fc6ec34bba7e131ba23ce3a2.tar.gz |
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.
Diffstat (limited to 'pod/buildtoc')
-rw-r--r-- | pod/buildtoc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pod/buildtoc b/pod/buildtoc index c846d994b3..a44e1b7dfb 100644 --- a/pod/buildtoc +++ b/pod/buildtoc @@ -237,6 +237,8 @@ sub podset { s/^\s*\*\s*//; s/\n/ /g; s/\s+$//; + # make sure inner links include the target page + s{L<(?:[^|>]+\|)?\K/}{$pod/}g; next if /^[\d.]+$/; next if $pod eq 'perlmodlib' && /^ftp:/; $OUT .= ", " if $initem; |