mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Conversion: Fix error when converting EPUB/HTML files that contain invalid margin or padding declarations. Fixes #1360842 [ePub to PDF convertion failed](https://bugs.launchpad.net/calibre/+bug/1360842)
This commit is contained in:
parent
8ffd0215ef
commit
bd55c5e1e2
@ -206,7 +206,7 @@ def normalize_filter_css(props):
|
|||||||
|
|
||||||
def condense_edge(vals):
|
def condense_edge(vals):
|
||||||
edges = {x.name.rpartition('-')[-1]:x.value for x in vals}
|
edges = {x.name.rpartition('-')[-1]:x.value for x in vals}
|
||||||
if len(edges) != 4:
|
if len(edges) != 4 or set(edges) != {'left', 'top', 'right', 'bottom'}:
|
||||||
return
|
return
|
||||||
ce = {}
|
ce = {}
|
||||||
for (x, y) in [('left', 'right'), ('top', 'bottom')]:
|
for (x, y) in [('left', 'right'), ('top', 'bottom')]:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user