Mercurial > hg > lxmldump
comparison lxmldump.py @ 37:e176fcfc0235
Fix overstripping of concatenated strings.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 25 May 2021 23:25:44 +0300 |
parents | 4c8aafff8c5f |
children | 0e586b4ab62c |
comparison
equal
deleted
inserted
replaced
36:4c8aafff8c5f | 37:e176fcfc0235 |
---|---|
237 for pnode in lnode.iter(): | 237 for pnode in lnode.iter(): |
238 if pnode.tag == "Ptr": | 238 if pnode.tag == "Ptr": |
239 stmp += pkk_ptr_to_text(pnode) | 239 stmp += pkk_ptr_to_text(pnode) |
240 else: | 240 else: |
241 if isinstance(pnode.text, str): | 241 if isinstance(pnode.text, str): |
242 stmp += pkk_str_annotate(pnode.tag, pkk_str_clean(pnode.text).strip()) | 242 stmp += pkk_str_annotate(pnode.tag, pkk_str_clean(pnode.text)) |
243 | 243 |
244 if isinstance(pnode.tail, str): | 244 if isinstance(pnode.tail, str): |
245 stmp += pkk_str_clean(pnode.tail) | 245 stmp += pkk_str_clean(pnode.tail) |
246 | 246 |
247 return stmp.strip() | 247 return stmp.strip() |