From e009ab92fa75c6eb77363344385bac8feb87be44 Mon Sep 17 00:00:00 2001 From: Vasista Vovveti Date: Tue, 3 Jan 2023 15:37:53 -0500 Subject: [PATCH] check for description length before subscripting (#90) --- sphinxext/opengraph/descriptionparser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sphinxext/opengraph/descriptionparser.py b/sphinxext/opengraph/descriptionparser.py index a89aa65..08a4d9d 100644 --- a/sphinxext/opengraph/descriptionparser.py +++ b/sphinxext/opengraph/descriptionparser.py @@ -101,7 +101,7 @@ def dispatch_departure(self, node: nodes.Element) -> None: # Separate end of list from text if isinstance(node, nodes.Sequential): - if self.description[-1] == ",": + if self.description and self.description[-1] == ",": self.description = self.description[:-1] self.description += "." self.list_level -= 1