summaryrefslogtreecommitdiff
path: root/lib/Pod
diff options
context:
space:
mode:
authorAchim Bohnet <ach@mpe.mpg.de>1998-02-11 18:29:20 +0100
committerMalcolm Beattie <mbeattie@sable.ox.ac.uk>1998-02-12 16:36:53 +0000
commitb74bceb9cc5d8f31510279b2c34ea465fe21fd8f (patch)
tree5e696dd77590856173a4d19bfa5c0d89b5779fd0 /lib/Pod
parentda9788ee9703522615b8d8b2baff4bef1b196a10 (diff)
downloadperl-b74bceb9cc5d8f31510279b2c34ea465fe21fd8f.tar.gz
5.004_58 | _04: pod2*,perlpod: L<show this|man/section>
p4raw-id: //depot/perl@508
Diffstat (limited to 'lib/Pod')
-rw-r--r--lib/Pod/Html.pm11
-rw-r--r--lib/Pod/Text.pm4
2 files changed, 11 insertions, 4 deletions
diff --git a/lib/Pod/Html.pm b/lib/Pod/Html.pm
index d6add626a6..d03c1b6680 100644
--- a/lib/Pod/Html.pm
+++ b/lib/Pod/Html.pm
@@ -1344,6 +1344,9 @@ sub process_L {
$str =~ s/\n/ /g; # undo word-wrapped tags
$s1 = $str;
for ($s1) {
+ # LREF: a la HREF L<show this text|man/section>
+ $linktext = $1 if s:^([^|]+)\|::;
+
# a :: acts like a /
s,::,/,;
@@ -1369,13 +1372,13 @@ sub process_L {
$page=$page83 if (defined $pages{$page83});
if ($page eq "") {
$link = "#" . htmlify(0,$section);
- $linktext = $section;
+ $linktext = $section unless defined($linktext);
} elsif (!defined $pages{$page}) {
warn "$0: $podfile: cannot resolve L<$str> in paragraph $paragraph: no such page '$page'\n";
$link = "";
- $linktext = $page;
+ $linktext = $page unless defined($linktext);
} else {
- $linktext = ($section ? "$section" : "the $page manpage");
+ $linktext = ($section ? "$section" : "the $page manpage") unless defined($linktext);
$section = htmlify(0,$section) if $section ne "";
# if there is a directory by the name of the page, then assume that an
@@ -1397,7 +1400,7 @@ sub process_L {
warn "$0: $podfile: cannot resolve L$str in paragraph $paragraph: ".
"no .pod or .pm found\n";
$link = "";
- $linktext = $section;
+ $linktext = $section unless defined($linktext);
}
}
}
diff --git a/lib/Pod/Text.pm b/lib/Pod/Text.pm
index 96fda96aed..67993db3f5 100644
--- a/lib/Pod/Text.pm
+++ b/lib/Pod/Text.pm
@@ -165,6 +165,10 @@ sub prepare_for_output {
s/I<(.*?)>/*$1*/sg;
# s/[CB]<(.*?)>/bold($1)/ge;
s/X<.*?>//sg;
+
+ # LREF: a la HREF L<show this text|man/section>
+ s:L<([^|>]+)\|[^>]+>:$1:g;
+
# LREF: a manpage(3f)
s:L<([a-zA-Z][^\s\/]+)(\([^\)]+\))?>:the $1$2 manpage:g;
# LREF: an =item on another manpage