mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Conversion: Correctly handle values of left, right for the deprecated align attribute of images, mapping them to the CSS float property instead of text-align. Fixes #1081094 (Text not wrapping alongside images that are left/right aligned when converting to epub)
This commit is contained in:
parent
f7310d5b99
commit
b6b2b39cf6
@ -313,7 +313,7 @@ class CSSFlattener(object):
|
|||||||
if val in ('middle', 'bottom', 'top'):
|
if val in ('middle', 'bottom', 'top'):
|
||||||
cssdict['vertical-align'] = val
|
cssdict['vertical-align'] = val
|
||||||
elif val in ('left', 'right'):
|
elif val in ('left', 'right'):
|
||||||
cssdict['text-align'] = val
|
cssdict['float'] = val
|
||||||
del node.attrib['align']
|
del node.attrib['align']
|
||||||
if node.tag == XHTML('font'):
|
if node.tag == XHTML('font'):
|
||||||
tags = ['descendant::h:%s'%x for x in ('p', 'div', 'table', 'h1',
|
tags = ['descendant::h:%s'%x for x in ('p', 'div', 'table', 'h1',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user