# HG changeset patch # User Matti Hamalainen # Date 1639645460 -7200 # Node ID f1fd5a53c3411dc2f28ac14d1b1709fd5bbaa2b8 # Parent 4e27677ca5a98165b6eef0c424f897d979347777 Fix URLs. diff -r 4e27677ca5a9 -r f1fd5a53c341 lxmldump.py --- a/lxmldump.py Thu Dec 09 10:35:59 2021 +0200 +++ b/lxmldump.py Thu Dec 16 11:04:20 2021 +0200 @@ -313,12 +313,16 @@ ## Format a "Ptr" node as text def pkk_ptr_to_text(pnode): pfmt = pkk_get_fmt("ptr_fmt") + ptext = ("".join(pnode.itertext())).strip() if pkk_cfg.annotate: ptext = re.sub(r'\s*\.\s*$', '', ptext) + + phref = pnode.attrib["{http://www.w3.org/TR/xlink}href"].replace(" ", "+") + return pfmt.format( text=ptext, - href=pnode.attrib["{http://www.w3.org/TR/xlink}href"]) + href=phref) ## Get text inside a given node