jp (output xml): remove blank spaces on parsing for better pretty printing
This commit is contained in:
parent
220042d6b1
commit
2c6afc6d4f
1 changed files with 2 additions and 1 deletions
|
|
@ -59,7 +59,8 @@ class XML(object):
|
|||
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)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue