mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-08-11 09:13:57 -04:00
Make page break insertion a little more sensitive.
This commit is contained in:
parent
7ee1d99e5b
commit
3dc1510809
@ -1010,7 +1010,8 @@ class HTMLConverter(object):
|
||||
self.end_page()
|
||||
self.page_break_found = True
|
||||
if not self.page_break_found and self.page_break.match(tagname):
|
||||
if len(self.current_page.contents) > 3:
|
||||
num = len([1 for i in self.current_block.contents if isinstance(i, Paragraph)])
|
||||
if len(self.current_page.contents) > 3 or num > 3:
|
||||
self.end_page()
|
||||
self.logger.debug('Forcing page break at %s', tagname)
|
||||
return end_page
|
||||
|
Loading…
x
Reference in New Issue
Block a user