fixed the other plugins using preprocess

This commit is contained in:
ldolse 2011-01-14 22:18:44 +08:00
parent 90c978bb10
commit 4893fa5d3a
4 changed files with 4 additions and 4 deletions

View File

@ -486,7 +486,7 @@ class HTMLInput(InputFormatPlugin):
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)

View File

@ -420,7 +420,7 @@ class LRFInput(InputFormatPlugin):
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)

View File

@ -39,7 +39,7 @@ class MOBIInput(InputFormatPlugin):
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

View File

@ -33,7 +33,7 @@ class PDBInput(InputFormatPlugin):
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)