Closes #791: Fix QtHelp and HtmlHelp index entry links.

This commit is contained in:
Georg Brandl
2011-11-01 09:24:34 +01:00
parent 53d06fda7b
commit 8fdeaec018
3 changed files with 7 additions and 4 deletions

View File

@@ -1,6 +1,8 @@
Release 1.1.1 (in development) Release 1.1.1 (in development)
============================== ==============================
* #791: Fix QtHelp and HtmlHelp index entry links.
* #792: Include "sphinx-apidoc" in the source distribution. * #792: Include "sphinx-apidoc" in the source distribution.
* #797: Don't crash on a misformatted glossary. * #797: Don't crash on a misformatted glossary.

View File

@@ -258,7 +258,8 @@ class HTMLHelpBuilder(StandaloneHTMLBuilder):
f.write('<UL>\n') f.write('<UL>\n')
def write_index(title, refs, subitems): def write_index(title, refs, subitems):
def write_param(name, value): def write_param(name, value):
item = ' <param name="%s" value="%s">\n' % (name, value) item = ' <param name="%s" value="%s">\n' % \
(name, value[1])
f.write(item) f.write(item)
title = cgi.escape(title) title = cgi.escape(title)
f.write('<LI> <OBJECT type="text/sitemap">\n') f.write('<LI> <OBJECT type="text/sitemap">\n')

View File

@@ -256,7 +256,7 @@ class QtHelpBuilder(StandaloneHTMLBuilder):
groupdict = matchobj.groupdict() groupdict = matchobj.groupdict()
shortname = groupdict['title'] shortname = groupdict['title']
id = groupdict.get('id') id = groupdict.get('id')
# descr = groupdict.get('descr') #descr = groupdict.get('descr')
if shortname.endswith('()'): if shortname.endswith('()'):
shortname = shortname[:-2] shortname = shortname[:-2]
id = '%s.%s' % (id, shortname) id = '%s.%s' % (id, shortname)
@@ -265,9 +265,9 @@ class QtHelpBuilder(StandaloneHTMLBuilder):
if id: if id:
item = ' '*12 + '<keyword name="%s" id="%s" ref="%s"/>' % ( item = ' '*12 + '<keyword name="%s" id="%s" ref="%s"/>' % (
name, id, ref) name, id, ref[1])
else: else:
item = ' '*12 + '<keyword name="%s" ref="%s"/>' % (name, ref) item = ' '*12 + '<keyword name="%s" ref="%s"/>' % (name, ref[1])
item.encode('ascii', 'xmlcharrefreplace') item.encode('ascii', 'xmlcharrefreplace')
return item return item