mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
remove heuristics from pdb input
This commit is contained in:
parent
80ed2e7d4e
commit
65f9eff665
@ -299,7 +299,7 @@ class PreProcessor(object):
|
|||||||
blanklines = blankreg.findall(html)
|
blanklines = blankreg.findall(html)
|
||||||
lines = linereg.findall(html)
|
lines = linereg.findall(html)
|
||||||
blanks_between_paragraphs = False
|
blanks_between_paragraphs = False
|
||||||
print "delete blank paragraphs is "+str(getattr(self.extra_opts, 'delete_blank_paragraphs', True))
|
print "delete blank paragraphs is "+str(getattr(self.extra_opts, 'delete_blank_paragraphs', False))
|
||||||
if len(lines) > 1:
|
if len(lines) > 1:
|
||||||
self.log("There are " + unicode(len(blanklines)) + " blank lines. " +
|
self.log("There are " + unicode(len(blanklines)) + " blank lines. " +
|
||||||
unicode(float(len(blanklines)) / float(len(lines))) + " percent blank")
|
unicode(float(len(blanklines)) / float(len(lines))) + " percent blank")
|
||||||
|
@ -32,8 +32,3 @@ class PDBInput(InputFormatPlugin):
|
|||||||
opf = reader.extract_content(os.getcwd())
|
opf = reader.extract_content(os.getcwd())
|
||||||
|
|
||||||
return opf
|
return opf
|
||||||
|
|
||||||
def heuristics(self, options, html):
|
|
||||||
self.options = options
|
|
||||||
preprocessor = PreProcessor(self.options, log=getattr(self, 'log', None))
|
|
||||||
return preprocessor(html)
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user