Infra: Fix hiding of References if it contains invisible SystemMessage (#3083)

This commit is contained in:
C.A.M. Gerlach 2023-04-03 09:05:21 -05:00 committed by GitHub
parent 9b56f53c05
commit 4b3c9504ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@ class PEPFooter(transforms.Transform):
types.add(type(node))
if isinstance(node, nodes.target):
to_hoist.append(node)
if types <= {nodes.title, nodes.target}:
if types <= {nodes.title, nodes.target, nodes.system_message}:
section.parent.extend(to_hoist)
section.parent.remove(section)