mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-31 14:33:54 -04:00
Make page break insertion a little more sensitive.
This commit is contained in:
parent
abbb49bb39
commit
2899de0d2f
@ -1012,7 +1012,7 @@ class HTMLConverter(object):
|
|||||||
if not self.page_break_found and self.page_break.match(tagname):
|
if not self.page_break_found and self.page_break.match(tagname):
|
||||||
number_of_paragraphs = sum([
|
number_of_paragraphs = sum([
|
||||||
len([1 for i in block.contents if isinstance(i, Paragraph)])
|
len([1 for i in block.contents if isinstance(i, Paragraph)])
|
||||||
for block in self.current_page.contents is isinstance(block, TextBlock)
|
for block in self.current_page.contents if isinstance(block, TextBlock)
|
||||||
])
|
])
|
||||||
|
|
||||||
if number_of_paragraphs > 2:
|
if number_of_paragraphs > 2:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user