Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Python docstring type handling bug #10738

Merged
merged 13 commits into from Aug 2, 2022
2 changes: 1 addition & 1 deletion sphinx/domains/python.py
Expand Up @@ -380,7 +380,7 @@ def make_xrefs(self, rolename: str, domain: str, target: str,
innernode: Type[TextlikeNode] = nodes.emphasis,
contnode: Node = None, env: BuildEnvironment = None,
inliner: Inliner = None, location: Node = None) -> List[Node]:
delims = r'(\s*[\[\]\(\),](?:\s*or\s)?\s*|\s+or\s+|\s*\|\s*|\.\.\.)'
delims = r'(\s*[\[\]\(\),](?:\s*or|of\s)?\s*|\s+or|of\s+|\s*\|\s*|\.\.\.)'
AA-Turner marked this conversation as resolved.
Show resolved Hide resolved
ProGamerGov marked this conversation as resolved.
Show resolved Hide resolved
delims_re = re.compile(delims)
sub_targets = re.split(delims, target)

Expand Down