mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #9334 from tk0miya/9322_KeyError_from_PropageteDescDomain
Fix sphinx-doc#9322: KeyError is raised on PropagateDescDomain transform
This commit is contained in:
commit
723ad78306
1
CHANGES
1
CHANGES
@ -27,6 +27,7 @@ Bugs fixed
|
||||
with Japanese engines
|
||||
* #9354: C, remove special macro names from the keyword list.
|
||||
See also :confval:`c_extra_keywords`.
|
||||
* #9322: KeyError is raised on PropagateDescDomain transform
|
||||
|
||||
Testing
|
||||
--------
|
||||
|
@ -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]:
|
||||
|
Loading…
Reference in New Issue
Block a user