From b23f0489f4008187b9b6cd4d86145da615f22035 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sat, 11 Jan 2014 21:40:26 +0100 Subject: [PATCH] fix oversight in last commit --- sphinx/directives/__init__.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/sphinx/directives/__init__.py b/sphinx/directives/__init__.py index 52e6e6fba..d2b70b82f 100644 --- a/sphinx/directives/__init__.py +++ b/sphinx/directives/__init__.py @@ -149,11 +149,12 @@ class ObjectDescription(Directive): signode.clear() signode += addnodes.desc_name(sig, sig) continue # we don't want an index entry here - self.names.append(name) - if not noindex and name not in self.names: - # only add target and index entry if this is the first - # description of the object with this name in this desc block - self.add_target_and_index(name, sig, signode) + if name not in self.names: + self.names.append(name) + if not noindex: + # only add target and index entry if this is the first + # description of the object with this name in this desc block + self.add_target_and_index(name, sig, signode) contentnode = addnodes.desc_content() node.append(contentnode)