diff --git a/adi_doctools/__init__.py b/adi_doctools/__init__.py index f09c164..2bace4c 100644 --- a/adi_doctools/__init__.py +++ b/adi_doctools/__init__.py @@ -158,7 +158,8 @@ def make_unique_id(node, id_): # and deprecates traverse (returns a list). # Sphinx 7.1.2 requires Docutils >= 0.18.1 for node in self.document.findall(): - if 'ids' in node and node['ids']: + if (not isinstance(node, nodes.Text) and + 'ids' in node and node['ids']): make_unique_id(node, node['ids'][0])