mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
MOBI Output: The Ignore margins setting no longer ignores blockquotes, only margins set via CSS on other elements. Fixes #758675 (Conversion to mobi with the 'ignore margins' option deletes existing blockquotes)
This commit is contained in:
parent
c21095c457
commit
f1ad415fac
@ -495,6 +495,10 @@ class MobiMLizer(object):
|
|||||||
vtag.append(child)
|
vtag.append(child)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if tag == 'blockquote':
|
||||||
|
old_mim = self.opts.mobi_ignore_margins
|
||||||
|
self.opts.mobi_ignore_margins = False
|
||||||
|
|
||||||
if text or tag in CONTENT_TAGS or tag in NESTABLE_TAGS:
|
if text or tag in CONTENT_TAGS or tag in NESTABLE_TAGS:
|
||||||
self.mobimlize_content(tag, text, bstate, istates)
|
self.mobimlize_content(tag, text, bstate, istates)
|
||||||
for child in elem:
|
for child in elem:
|
||||||
@ -510,6 +514,8 @@ class MobiMLizer(object):
|
|||||||
if tail:
|
if tail:
|
||||||
self.mobimlize_content(tag, tail, bstate, istates)
|
self.mobimlize_content(tag, tail, bstate, istates)
|
||||||
|
|
||||||
|
if tag == 'blockquote':
|
||||||
|
self.opts.mobi_ignore_margins = old_mim
|
||||||
|
|
||||||
if bstate.content and style['page-break-after'] in PAGE_BREAKS:
|
if bstate.content and style['page-break-after'] in PAGE_BREAKS:
|
||||||
bstate.pbreak = True
|
bstate.pbreak = True
|
||||||
|
Loading…
x
Reference in New Issue
Block a user