mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
DOCX Input: Support for the keepNext paragraph property to keep successive paragraphs on the same page.
This commit is contained in:
parent
a191e41a5e
commit
e57dcd0f81
@ -350,6 +350,8 @@ class ParagraphStyle(object):
|
||||
c['page-break-inside'] = 'avoid'
|
||||
if self.pageBreakBefore is True:
|
||||
c['page-break-before'] = 'always'
|
||||
if self.keepNext is True:
|
||||
c['page-break-after'] = 'avoid'
|
||||
for edge in ('left', 'top', 'right', 'bottom'):
|
||||
val = getattr(self, 'border_%s_width' % edge)
|
||||
if val is not inherit:
|
||||
@ -377,4 +379,3 @@ class ParagraphStyle(object):
|
||||
|
||||
return self._css
|
||||
|
||||
# TODO: keepNext must be done at markup level
|
||||
|
Loading…
x
Reference in New Issue
Block a user