Commits

Georg Brandl committed 6a181a0 Merge

Fix #86; merged from mq

Comments (0)

Files changed (2)

 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.
 

sphinx/environment.py

         # 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',