Fix #86; merged from mq

This commit is contained in:
Georg Brandl 2009-01-14 19:39:27 +01:00
commit eefc54baca
2 changed files with 4 additions and 2 deletions

View File

@ -1,6 +1,8 @@
Release 0.5.2 (in development)
==============================
* #86: Fix explicit document titles in toctrees.
* #81: Write environment and search index in a manner that is safe
from exceptions that occur during dumping.

View File

@ -972,12 +972,12 @@ class BuildEnvironment:
# replace titles, if needed, and set the target paths in the
# toctrees (they are not known at TOC generation time)
for refnode in newnode.traverse(nodes.reference):
refnode['refuri'] = builder.get_relative_uri(
docname, refnode['refuri']) + refnode['anchorname']
if titleoverrides and not refnode['anchorname'] \
and refnode['refuri'] in titleoverrides:
newtitle = titleoverrides[refnode['refuri']]
refnode.children = [nodes.Text(newtitle)]
refnode['refuri'] = builder.get_relative_uri(
docname, refnode['refuri']) + refnode['anchorname']
return newnode
descroles = frozenset(('data', 'exc', 'func', 'class', 'const', 'attr', 'obj',