From ec7d64195f45baa5199cc17510facf056bfa9cee Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 30 Jan 2014 11:54:03 +0530 Subject: [PATCH] Diff view: Add option to pretty print HTML/XML before calculating changes --- src/calibre/ebooks/oeb/polish/pretty.py | 7 +++-- src/calibre/gui2/tweak_book/diff/main.py | 39 +++++++++++++++--------- src/calibre/gui2/tweak_book/diff/view.py | 22 +++++++++++-- 3 files changed, 48 insertions(+), 20 deletions(-) diff --git a/src/calibre/ebooks/oeb/polish/pretty.py b/src/calibre/ebooks/oeb/polish/pretty.py index b44f45ebcb..8f89549d9e 100644 --- a/src/calibre/ebooks/oeb/polish/pretty.py +++ b/src/calibre/ebooks/oeb/polish/pretty.py @@ -173,9 +173,10 @@ def pretty_html_tree(container, root): for body in root.findall('h:body', namespaces=XPNSMAP): pretty_block(body) - # Handle