X-Git-Url: https://git.mdrn.pl/librarian.git/blobdiff_plain/18db48c927f52d497aea34b5d0daf855902367a3..88f39c4f90a67164b2c3da7c7a41df420f3b17ab:/src/librarian/document.py?ds=inline 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':