Skip to content

Commit

Permalink
[build] texinfo: fix crash in reference nodes without children (#…
Browse files Browse the repository at this point in the history
…12389)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
  • Loading branch information
quotuva and picnixz authored May 22, 2024
1 parent 548f0f9 commit 9cc0ea1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sphinx/writers/texinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@ def visit_reference(self, node: Element) -> None:
# cases for the sake of appearance
if isinstance(node.parent, (nodes.title, addnodes.desc_type)):
return
if isinstance(node[0], nodes.image):
if len(node) != 0 and isinstance(node[0], nodes.image):
return
name = node.get('name', node.astext()).strip()
uri = node.get('refuri', '')
Expand Down

0 comments on commit 9cc0ea1

Please sign in to comment.