summaryrefslogtreecommitdiffstats
path: root/Doc/tools/support.py
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/tools/support.py')
-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