mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
C++, skip adding already used old-style ids.
See michaeljones/breathe#266.
This commit is contained in:
parent
2d20e337b3
commit
c0df9205e6
@ -3759,8 +3759,14 @@ class CPPObject(ObjectDescription):
|
||||
else:
|
||||
# print("[CPP] non-unique name:", name)
|
||||
pass
|
||||
for id in ids:
|
||||
if id: # is None when the element didn't exist in that version
|
||||
# always add the newest id
|
||||
assert newestId
|
||||
signode['ids'].append(newestId)
|
||||
# only add compatibility ids when there are no conflicts
|
||||
for id in ids[1:]:
|
||||
if not id: # is None when the element didn't exist in that version
|
||||
continue
|
||||
if id not in self.state.document.ids:
|
||||
signode['ids'].append(id)
|
||||
signode['first'] = (not self.names) # hmm, what is this abound?
|
||||
self.state.document.note_explicit_target(signode)
|
||||
|
Loading…
Reference in New Issue
Block a user