summaryrefslogtreecommitdiffstats
path: root/Doc/perl
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2004-08-19 01:37:48 (GMT)
committerFred Drake <fdrake@acm.org>2004-08-19 01:37:48 (GMT)
commitc6f3c8b612c8265fcf9c1dc9d8c8ca4c6316a37a (patch)
tree67b60a0c0df12c1aef9ea10fe4dc49e59e6b692b /Doc/perl
parentcf02e3168317234abad57791d7e84c02b151b184 (diff)
downloadcpython-c6f3c8b612c8265fcf9c1dc9d8c8ca4c6316a37a.zip
cpython-c6f3c8b612c8265fcf9c1dc9d8c8ca4c6316a37a.tar.gz
cpython-c6f3c8b612c8265fcf9c1dc9d8c8ca4c6316a37a.tar.bz2
fix SF bug #1008690: Incorrect <link rel="index"> href in Tutorial
The make_head_and_body() function used a hardcoded value for the <link> element for the index; this patch causes the proper output filename to be captured during the transformation phase so it can be used during the page assembly phase.
Diffstat (limited to 'Doc/perl')
-rw-r--r--Doc/perl/l2hinit.perl13
1 files changed, 8 insertions, 5 deletions
diff --git a/Doc/perl/l2hinit.perl b/Doc/perl/l2hinit.perl
index e955e7c..8c670a7 100644
--- a/Doc/perl/l2hinit.perl
+++ b/Doc/perl/l2hinit.perl
@@ -485,11 +485,15 @@ sub do_cmd_textohtmlinfopage {
$_;
}
+$GENERAL_INDEX_FILE = '';
+$MODULE_INDEX_FILE = '';
+
# $idx_mark will be replaced with the real index at the end
sub do_cmd_textohtmlindex {
local($_) = @_;
$TITLE = $idx_title;
$idxfile = $CURRENT_FILE;
+ $GENERAL_INDEX_FILE = "$CURRENT_FILE";
if (%index_labels) { make_index_labels(); }
if (($SHORT_INDEX) && (%index_segment)) { make_preindex(); }
else { $preindex = ''; }
@@ -499,8 +503,6 @@ sub do_cmd_textohtmlindex {
return "<br />\n" . $pre . $_;
}
-$MODULE_INDEX_FILE = '';
-
# $idx_module_mark will be replaced with the real index at the end
sub do_cmd_textohtmlmoduleindex {
local($_) = @_;
@@ -682,12 +684,13 @@ sub make_head_and_body($$) {
. ' title="Contents" />')
: ''),
($HAVE_GENERAL_INDEX
- ? "\n<link rel='index' href='genindex.html' title='Index' />"
+ ? ("\n<link rel='index' href='$GENERAL_INDEX_FILE'"
+ . " title='Index' />")
: ''),
# disable for now -- Mozilla doesn't do well with multiple indexes
# ($HAVE_MODULE_INDEX
- # ? '<link rel="index" href="modindex.html" title="Module Index"'
- # . " />\n"
+ # ? ("<link rel="index" href='$MODULE_INDEX_FILE'"
+ # . " title='Module Index' />\n")
# : ''),
($INFO
# XXX We can do this with the Python tools since the About...