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.
This commit is contained in:
Fred Drake 2001-10-22 15:07:16 +00:00
parent 5d9a6b575c
commit f10584cb11
1 changed files with 10 additions and 1 deletions

View File

@ -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