summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/spack/docs/conf.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/spack/docs/conf.py b/lib/spack/docs/conf.py
index 887d04b565..b27a3a5538 100644
--- a/lib/spack/docs/conf.py
+++ b/lib/spack/docs/conf.py
@@ -135,6 +135,20 @@ for line in fileinput.input('spack.rst', inplace=1):
# Enable todo items
todo_include_todos = True
+#
+# Disable duplicate cross-reference warnings.
+#
+from sphinx.domains.python import PythonDomain
+class PatchedPythonDomain(PythonDomain):
+ def resolve_xref(self, env, fromdocname, builder, typ, target, node, contnode):
+ if 'refspecific' in node:
+ del node['refspecific']
+ return super(PatchedPythonDomain, self).resolve_xref(
+ env, fromdocname, builder, typ, target, node, contnode)
+
+def setup(sphinx):
+ sphinx.override_domain(PatchedPythonDomain)
+
# -- General configuration -----------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.