mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 21:34:56 +02:00
fixed the other plugins using preprocess
This commit is contained in:
parent
90c978bb10
commit
4893fa5d3a
4 changed files with 4 additions and 4 deletions
|
|
@ -486,7 +486,7 @@ def css_import_handler(self, base, href):
|
|||
return (None, None)
|
||||
return (None, raw)
|
||||
|
||||
def preprocess_html(self, options, html):
|
||||
def heuristics(self, options, html):
|
||||
self.options = options
|
||||
preprocessor = PreProcessor(self.options, log=getattr(self, 'log', None))
|
||||
return preprocessor(html)
|
||||
|
|
|
|||
|
|
@ -420,7 +420,7 @@ def convert(self, stream, options, file_ext, log,
|
|||
styles.write()
|
||||
return os.path.abspath('content.opf')
|
||||
|
||||
def preprocess_html(self, options, html):
|
||||
def heuristics(self, options, html):
|
||||
self.options = options
|
||||
preprocessor = PreProcessor(self.options, log=getattr(self, 'log', None))
|
||||
return preprocessor(html)
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ def convert(self, stream, options, file_ext, log,
|
|||
accelerators['pagebreaks'] = '//h:div[@class="mbp_pagebreak"]'
|
||||
return mr.created_opf_path
|
||||
|
||||
def preprocess_html(self, options, html):
|
||||
def heuristics(self, options, html):
|
||||
# search for places where a first or second level heading is immediately followed by another
|
||||
# top level heading. demote the second heading to h3 to prevent splitting between chapter
|
||||
# headings and titles, images, etc
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ def convert(self, stream, options, file_ext, log,
|
|||
|
||||
return opf
|
||||
|
||||
def preprocess_html(self, options, html):
|
||||
def heuristics(self, options, html):
|
||||
self.options = options
|
||||
preprocessor = PreProcessor(self.options, log=getattr(self, 'log', None))
|
||||
return preprocessor(html)
|
||||
|
|
|
|||
Loading…
Reference in a new issue