This commit is contained in:
Kovid Goyal 2020-04-05 12:55:11 +05:30
parent 19a777d34a
commit 00219fde67
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -176,7 +176,7 @@ def encode(doc, node, offset, tail): # {{{
child = child.nextSibling child = child.nextSibling
# Add id assertions for robustness where possible # Add id assertions for robustness where possible
id = node.getAttribute('id') if node.getAttribute else None id = node.id
idspec = ('[' + escape_for_cfi(id) + ']') if id else '' idspec = ('[' + escape_for_cfi(id) + ']') if id else ''
cfi = '/' + index + idspec + cfi cfi = '/' + index + idspec + cfi
node = p node = p