From 9c9a55d7dda5595a236f11977d7f21f804d37872 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Wed, 22 May 2024 11:44:56 +0200 Subject: [PATCH] Fix for comments. --- src/librarian/document.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/librarian/document.py b/src/librarian/document.py index 2e9a4a5..7780b61 100644 --- a/src/librarian/document.py +++ b/src/librarian/document.py @@ -81,6 +81,7 @@ class WLDocument: """ EXPR = re.compile(r'/\s', re.MULTILINE | re.UNICODE) def _compat_assign_ordered_ids_in_elem(elem, i): + if isinstance(elem, etree._Comment): return i elem.attrib['_compat_ordered_id'] = str(i) i += 1 if getattr(elem, 'HTML_CLASS', None) == 'stanza': -- 2.20.1