From f490645392fd4efbfbfa434f2d5d8bc1ebff2b7a Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 9 Nov 2008 20:48:32 +0100 Subject: [PATCH] #31: apply title transformations for xref roles in TOCs too. --- sphinx/environment.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sphinx/environment.py b/sphinx/environment.py index 4cf0e1779..bcacc541e 100644 --- a/sphinx/environment.py +++ b/sphinx/environment.py @@ -171,7 +171,8 @@ class SphinxContentsFilter(ContentsFilter): within table-of-contents link nodes. """ def visit_pending_xref(self, node): - self.parent.append(nodes.literal(node['reftarget'], node['reftarget'])) + text = node.astext() + self.parent.append(nodes.literal(text, text)) raise nodes.SkipNode