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 sphinx-doc#9322: KeyError is raised on PropagateDescDomain transform #9334

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES
Expand Up @@ -17,6 +17,7 @@ Bugs fixed
----------

* #9313: LaTeX: complex table with merged cells broken since 4.0
* #9322: KeyError is raised on PropagateDescDomain transform

Testing
--------
Expand Down
3 changes: 2 additions & 1 deletion sphinx/transforms/post_transforms/__init__.py
Expand Up @@ -249,7 +249,8 @@ class PropagateDescDomain(SphinxPostTransform):

def run(self, **kwargs: Any) -> None:
for node in self.document.traverse(addnodes.desc_signature):
node['classes'].append(node.parent['domain'])
if node.parent.get('domain'):
node['classes'].append(node.parent['domain'])


def setup(app: Sphinx) -> Dict[str, Any]:
Expand Down