summaryrefslogtreecommitdiffstats
path: root/Doc/perl
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2000-09-19 15:36:19 (GMT)
committerFred Drake <fdrake@acm.org>2000-09-19 15:36:19 (GMT)
commit02c7082745f0d99ac9951a9ea0a1f07eaf8271d8 (patch)
tree64fb6c5b6b0824a5c8307d4edde5686cb3492bab /Doc/perl
parent752ba39a0b14243cdef1ef0666dfff3645d20079 (diff)
downloadcpython-02c7082745f0d99ac9951a9ea0a1f07eaf8271d8.zip
cpython-02c7082745f0d99ac9951a9ea0a1f07eaf8271d8.tar.gz
cpython-02c7082745f0d99ac9951a9ea0a1f07eaf8271d8.tar.bz2
make_nav_sectref(): Create more minimal HTML, hanging the class attribute
off an existing anchor tag if available (I think it always is, but am not completely sure).
Diffstat (limited to 'Doc/perl')
-rw-r--r--Doc/perl/l2hinit.perl9
1 files changed, 7 insertions, 2 deletions
diff --git a/Doc/perl/l2hinit.perl b/Doc/perl/l2hinit.perl
index b551158..4274a6c 100644
--- a/Doc/perl/l2hinit.perl
+++ b/Doc/perl/l2hinit.perl
@@ -97,8 +97,13 @@ $CUSTOM_BUTTONS = '';
sub make_nav_sectref {
my($label,$title) = @_;
if ($title) {
- return ("<b class='navlabel'>$label:</b> "
- . "<span class='sectref'>$title</span>\n");
+ if ($title =~ /\<[aA] /) {
+ $title =~ s/\<[aA] /<a class="sectref" /;
+ }
+ else {
+ $title = "<span class=\"sectref\">$title</span>";
+ }
+ return "<b class=\"navlabel\">$label:</b> $title\n";
}
return '';
}