summaryrefslogtreecommitdiffstats
path: root/Doc/perl
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2003-06-27 18:27:21 (GMT)
committerFred Drake <fdrake@acm.org>2003-06-27 18:27:21 (GMT)
commit4bbff7ba9696eb718d567ff6d2ee988f513af179 (patch)
treeb83e34bf09bb5a95fe80878272dc4fdbf3284bfb /Doc/perl
parent78347b509f7c503432762bdbc0cef02041419bcf (diff)
downloadcpython-4bbff7ba9696eb718d567ff6d2ee988f513af179.zip
cpython-4bbff7ba9696eb718d567ff6d2ee988f513af179.tar.gz
cpython-4bbff7ba9696eb718d567ff6d2ee988f513af179.tar.bz2
Don't assume the name of the table of contents will be contents.html;
that won't be right when mkhowto is called with --numeric (as it is for the Python Tutorial). Save the actual name we use when we build the table of contents, then use that in the page head metadata. The node2label.pl script will munge this properly when --numeric isn't given, so this works in both cases. Closes SF bug #761830.
Diffstat (limited to 'Doc/perl')
-rw-r--r--Doc/perl/l2hinit.perl6
1 files changed, 4 insertions, 2 deletions
diff --git a/Doc/perl/l2hinit.perl b/Doc/perl/l2hinit.perl
index 7a3aeeb..f48b583 100644
--- a/Doc/perl/l2hinit.perl
+++ b/Doc/perl/l2hinit.perl
@@ -385,12 +385,14 @@ sub add_idx_hook {
# In addition to the standard stuff, add label to allow named node files and
# support suppression of the page complete (for HTML Help use).
+$MY_CONTENTS_PAGE = '';
sub do_cmd_tableofcontents {
local($_) = @_;
$TITLE = $toc_title;
$tocfile = $CURRENT_FILE;
my($closures,$reopens) = preserve_open_tags();
anchor_label('contents', $CURRENT_FILE, $_); # this is added
+ $MY_CONTENTS_PAGE = "$CURRENT_FILE";
join('', "<BR>\n\\tableofchildlinks[off]", $closures
, make_section_heading($toc_title, 'H2'), $toc_mark
, $reopens, $_);
@@ -619,8 +621,8 @@ sub make_head_and_body {
"<link rel=\"STYLESHEET\" href=\"$STYLESHEET\">\n",
"<link rel=\"first\" href=\"$FILE.html\">\n",
($HAVE_TABLE_OF_CONTENTS
- ? ('<link rel="contents" href="contents.html" title="Contents">'
- . "\n")
+ ? ("<link rel='contents' href='$MY_CONTENTS_PAGE'"
+ . " title='Contents'>\n")
: ''),
($HAVE_GENERAL_INDEX
? '<link rel="index" href="genindex.html" title="Index">'