mirror of
https://github.com/python/cpython.git
synced 2025-12-10 02:50:09 +00:00
Fix xml.etree.ElementInclude to include the tail of the current node. Issue #6231
This commit is contained in:
parent
14bd1c3b2e
commit
ba8a98600e
3 changed files with 22 additions and 1 deletions
|
|
@ -125,7 +125,7 @@ def include(elem, loader=None):
|
|||
)
|
||||
if i:
|
||||
node = elem[i-1]
|
||||
node.tail = (node.tail or "") + text
|
||||
node.tail = (node.tail or "") + text + (e.tail or "")
|
||||
else:
|
||||
elem.text = (elem.text or "") + text + (e.tail or "")
|
||||
del elem[i]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue