[Python-checkins] r63554 - doctools/trunk/sphinx/htmlhelp.py
georg.brandl
python-checkins at python.org
Fri May 23 15:40:56 CEST 2008
Author: georg.brandl
Date: Fri May 23 15:40:56 2008
New Revision: 63554
Log:
FIx determination of the title in HTML help output.
Modified:
doctools/trunk/sphinx/htmlhelp.py
Modified: doctools/trunk/sphinx/htmlhelp.py
==============================================================================
--- doctools/trunk/sphinx/htmlhelp.py (original)
+++ doctools/trunk/sphinx/htmlhelp.py Fri May 23 15:40:56 2008
@@ -128,8 +128,9 @@
builder.info('writing project file...')
f = open(path.join(outdir, outname+'.hhp'), 'w')
try:
- f.write(project_template % {'outname': outname,
- 'title': builder.config.html_title,
+ title = builder.config.html_title or \
+ '%s v%s documentation' % (builder.config.project, builder.config.release)
+ f.write(project_template % {'outname': outname, 'title': title,
'version': builder.config.version,
'project': builder.config.project})
if not outdir.endswith(os.sep):
@@ -160,7 +161,8 @@
for subnode in node:
write_toc(subnode, ullevel)
elif isinstance(node, nodes.reference):
- item = object_sitemap % (cgi.escape(node.astext()), node['refuri'])
+ link = node['refuri']
+ item = object_sitemap % (cgi.escape(node.astext()), link)
f.write(item.encode('ascii', 'xmlcharrefreplace'))
elif isinstance(node, nodes.bullet_list):
if ullevel != 0:
More information about the Python-checkins
mailing list