Skip to content
Snippets Groups Projects
Commit f9f33dc9 authored by rahix's avatar rahix
Browse files

hack(docs): Add workaround for Sphinx issue #8945

With sphinx 3 a ton of warnings about unresolvable xrefs are generated.
Add a workaround to silence them.

Ref: https://github.com/sphinx-doc/sphinx/issues/8945
parent 93fdd74d
No related branches found
No related tags found
No related merge requests found
......@@ -149,3 +149,21 @@ except ImportError as e:
def setup(app):
app.add_config_value("has_hawkmoth", has_hawkmoth, "")
app.add_directive("color-example", ColorExample)
fix_issue_8945()
def fix_issue_8945():
c_domain = __import__("sphinx.domains.c").domains.c
for kw in ["char", "float", "int", "long", "short", "void", "_Bool", "bool", "_Complex", "complex"]:
c_domain._keywords.remove(kw)
def parse_xref_object(self):
name = self._parse_nested_name()
self.skip_ws()
self.skip_string('()')
# Removing this line as a hacky workaround:
# self.assert_end()
return name
c_domain.DefinitionParser.parse_xref_object = parse_xref_object
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment