mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
KeyError when having a duplicate citation
This commit is contained in:
parent
048a35ee54
commit
d0569a4ec9
@ -540,7 +540,7 @@ class StandardDomain(Domain):
|
||||
for node in document.traverse(nodes.citation):
|
||||
label = node[0].astext()
|
||||
if label in self.data['citations']:
|
||||
path = env.doc2path(self.data['citations'][0])
|
||||
path = env.doc2path(self.data['citations'][label][0])
|
||||
env.warn_node('duplicate citation %s, other instance in %s' %
|
||||
(label, path), node)
|
||||
self.data['citations'][label] = (docname, node['ids'][0])
|
||||
|
Loading…
Reference in New Issue
Block a user