Skip to content

Commit 593ae47

Browse files
authored
Rewrite L<> section (#4482)
Fixes #4481
1 parent 2543c9b commit 593ae47

File tree

1 file changed

+14
-17
lines changed

1 file changed

+14
-17
lines changed

doc/Language/pod.rakudoc

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -550,41 +550,38 @@ C<my $var = 1; say $var;>
550550

551551
=head2 Links
552552

553-
To create a link enclose it in C<L< >>
554-
555-
A vertical bar (optional) separates label and target.
556-
557-
The target location can be an URL (first example) or a local Pod6 document
558-
(second example). Local file names are relative to the base of the project, not
559-
the current document.
553+
To create a link enclose it in C<L< >>:
560554

561555
=for code :lang<rakudoc>
562556
Raku homepage L<https://raku.org>
563-
L<Raku homepage|https://raku.org>
564557

565558
Raku homepage L<https://raku.org>
566559

560+
An optional vertical bar can be used to separate the label from the target.
561+
562+
=for code :lang<rakudoc>
567563
L<Raku homepage|https://raku.org>
568564

565+
L<Raku homepage|https://raku.org>
566+
567+
Relative URLs are relative to the base of the project, so in this repository,
568+
for example, we can link to another page in the C<language> folder. Here we
569+
use an optional fragment to link to a heading:
570+
569571
=for code :lang<rakudoc>
570-
Structure L</language/about#Structure|/language/about#Structure>
571572
L<Structure|/language/about#Structure>
572573

573-
Structure L</language/about#Structure|/language/about#Structure>
574-
575574
L<Structure|/language/about#Structure>
576575

577-
To create a link to a section in the same document:
576+
One can also specify a link to a fragment in the current document:
577+
578578
=for code :lang<rakudoc>
579-
Comments L<#Comments>
580579
L<Comments|#Comments>
581580

582-
Comments L<#Comments>
583-
584581
L<Comments|#Comments>
585582

586-
Alongside the normal way of describing a path, viz. C«L<Some reference|path/to/filename>», it is also
587-
possible to use the module-style notation, e.g., C«L<Some reference|path::to::filename>».
583+
Finally, in addition to URL-style links (e.g. C«L<Some reference|path/to/filename>»),
584+
module-style notation (C«L<Some reference|path::to::filename>») also works.
588585

589586
=head2 Placement links
590587

0 commit comments

Comments
 (0)