summaryrefslogtreecommitdiff
path: root/sphinx/ext/mathbase.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2018-02-10 14:25:52 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2018-04-22 19:20:12 +0900
commitf4f693eff7b081785cc5704a6ff22cf0371355f3 (patch)
treec758aeaf575f2d01d5fd5a772143d49a16faa5e9 /sphinx/ext/mathbase.py
parenta2542cad0f96b76405663ef1a4117ca6eca989b7 (diff)
downloadsphinx-git-f4f693eff7b081785cc5704a6ff22cf0371355f3.tar.gz
#4459: duplicated labels detector does not work well in parallel build
Diffstat (limited to 'sphinx/ext/mathbase.py')
-rw-r--r--sphinx/ext/mathbase.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/sphinx/ext/mathbase.py b/sphinx/ext/mathbase.py
index 3cc734537..b217d5d56 100644
--- a/sphinx/ext/mathbase.py
+++ b/sphinx/ext/mathbase.py
@@ -72,6 +72,10 @@ class MathDomain(Domain):
# type: (Iterable[unicode], Dict) -> None
for labelid, (doc, eqno) in otherdata['objects'].items():
if doc in docnames:
+ if labelid in self.data['objects']:
+ otherdoc, _ = self.data['objects']
+ logger.warning('duplicate label of equation %s, other instance in %s' %
+ (labelid, self.env.doc2path(otherdoc)))
self.data['objects'][labelid] = (doc, eqno)
def resolve_xref(self, env, fromdocname, builder, typ, target, node, contnode):