From 91905e38f54765580344badbf3a302676c7b0c3c Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 4 Mar 2016 00:36:47 +0530 Subject: [PATCH] Make tweak_mode a class level variable --- src/calibre/ebooks/oeb/polish/container.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/calibre/ebooks/oeb/polish/container.py b/src/calibre/ebooks/oeb/polish/container.py index c5b1ccfe55..5b8d89f2e5 100644 --- a/src/calibre/ebooks/oeb/polish/container.py +++ b/src/calibre/ebooks/oeb/polish/container.py @@ -129,6 +129,8 @@ class Container(object): # {{{ book_type = 'oeb' #: If this container represents an unzipped book (a directory) is_dir = False + #: The mode used to parse HTML and CSS (polishing uses tweak_mode=False and the editor uses tweak_mode=True) + tweak_mode = False SUPPORTS_TITLEPAGES = True SUPPORTS_FILENAMES = True @@ -138,7 +140,6 @@ class Container(object): # {{{ self.log = log self.html_preprocessor = HTMLPreProcessor() self.css_preprocessor = CSSPreProcessor() - self.tweak_mode = False self.parsed_cache = {} self.mime_map = {}