Skip to content
Snippets Groups Projects
Commit 5a2b897b 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 71443082
No related branches found
No related tags found
1 merge request!460docs: Upgrade to Sphinx 3
......@@ -149,3 +149,32 @@ 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.
Finish editing this message first!
Please register or to comment