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:
Kovid Goyal 2011-04-12 08:12:45 -06:00
parent c21095c457
commit f1ad415fac

View File

@ -495,6 +495,10 @@ class MobiMLizer(object):
vtag.append(child)
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:
self.mobimlize_content(tag, text, bstate, istates)
for child in elem:
@ -510,6 +514,8 @@ class MobiMLizer(object):
if tail:
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:
bstate.pbreak = True