# HG changeset patch # User Goffi # Date 1489443177 -3600 # Node ID 577e1972474441b1f6790e81d8fd2e21fcba0a2c # Parent a1a8233f89e872151aa0d705dbe8c40e873212f2 jp (output xml): remove blank spaces on parsing for better pretty printing diff -r a1a8233f89e8 -r 577e19724744 frontends/src/jp/output_xml.py --- a/frontends/src/jp/output_xml.py Sun Mar 12 23:34:51 2017 +0100 +++ b/frontends/src/jp/output_xml.py Mon Mar 13 23:12:57 2017 +0100 @@ -59,7 +59,8 @@ return pygments.highlight(xml, lexer, formatter) def format(self, data, pretty=True): - tree = etree.fromstring(data) + parser = etree.XMLParser(remove_blank_text=True) + tree = etree.fromstring(data, parser) xml = etree.tostring(tree, encoding='unicode', pretty_print=pretty) return self.colorize(xml)