mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -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'
|
c['page-break-inside'] = 'avoid'
|
||||||
if self.pageBreakBefore is True:
|
if self.pageBreakBefore is True:
|
||||||
c['page-break-before'] = 'always'
|
c['page-break-before'] = 'always'
|
||||||
|
if self.keepNext is True:
|
||||||
|
c['page-break-after'] = 'avoid'
|
||||||
for edge in ('left', 'top', 'right', 'bottom'):
|
for edge in ('left', 'top', 'right', 'bottom'):
|
||||||
val = getattr(self, 'border_%s_width' % edge)
|
val = getattr(self, 'border_%s_width' % edge)
|
||||||
if val is not inherit:
|
if val is not inherit:
|
||||||
@ -377,4 +379,3 @@ class ParagraphStyle(object):
|
|||||||
|
|
||||||
return self._css
|
return self._css
|
||||||
|
|
||||||
# TODO: keepNext must be done at markup level
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user