summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2001-10-22 15:07:16 (GMT)
committerFred Drake <fdrake@acm.org>2001-10-22 15:07:16 (GMT)
commitf10584cb112c89da87d7d4b524851226ee7f9406 (patch)
treee410441aff7c2ad3f182817cb16d5963abc1fdd3
parent5d9a6b575ccfb0aed1447bc2b09252ea1e01936c (diff)
downloadcpython-f10584cb112c89da87d7d4b524851226ee7f9406.zip
cpython-f10584cb112c89da87d7d4b524851226ee7f9406.tar.gz
cpython-f10584cb112c89da87d7d4b524851226ee7f9406.tar.bz2
Do a little bit more to try and add <link> elements to the header, not that
Mozilla 0.9.5 can make intelligent use of them. Specifically, this causes the "Acknowledgements" and "Global Module Index" pages to acquire "up" links in the Mozilla "Site Navigation Bar". This partially responds to SF bug #469772.
-rw-r--r--Doc/tools/support.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/Doc/tools/support.py b/Doc/tools/support.py
index 836adf4..bfd86ce 100644
--- a/Doc/tools/support.py
+++ b/Doc/tools/support.py
@@ -87,7 +87,16 @@ class Options:
raise getopt.error("option %s not recognized" % opt)
def get_header(self):
- return HEAD % self.variables
+ s = HEAD % self.variables
+ if self.uplink:
+ if self.uptitle:
+ link = ('<link rel="up" href="%s" title="%s">'
+ % (self.uplink, self.uptitle))
+ else:
+ link = '<link rel="up" href="%s">' % self.uplink
+ repl = " %s\n</head>" % link
+ s = s.replace("</head>", repl, 1)
+ return s
def get_footer(self):
return TAIL % self.variables