Skip to content

Commit

Permalink
__init__: Skip Text node for unique id
Browse files Browse the repository at this point in the history
The text node seems to have a different class format that causes
issues with ids.

Signed-off-by: Jorge Marques <[email protected]>
  • Loading branch information
gastmaier committed Dec 20, 2024
1 parent c95dbc5 commit 9be25ce
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion adi_doctools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])


Expand Down

0 comments on commit 9be25ce

Please sign in to comment.