FB2 Output: Use pretty print option.

This commit is contained in:
John Schember 2010-12-03 19:14:09 -05:00
parent 692b6bcf02
commit 1fd503a12e

View File

@ -82,7 +82,9 @@ class FB2MLizer(object):
output.append(self.fb2mlize_images())
output.append(self.fb2_footer())
output = self.clean_text(u''.join(output))
#return u'<?xml version="1.0" encoding="UTF-8"?>\n%s' % etree.tostring(etree.fromstring(output), encoding=unicode, pretty_print=True)
if self.opts.pretty_print:
return u'<?xml version="1.0" encoding="UTF-8"?>\n%s' % etree.tostring(etree.fromstring(output), encoding=unicode, pretty_print=True)
else:
return u'<?xml version="1.0" encoding="UTF-8"?>' + output
def clean_text(self, text):