mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 14:14:31 +02:00
py3: Mix fixes
This commit is contained in:
parent
6f355b5297
commit
ad9627f14a
1 changed files with 5 additions and 2 deletions
|
|
@ -6,7 +6,7 @@
|
|||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2013, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
|
||||
import sys, os, re, math, errno, uuid
|
||||
import sys, os, re, math, errno, uuid, numbers
|
||||
from collections import OrderedDict, defaultdict
|
||||
|
||||
from lxml import html
|
||||
|
|
@ -788,7 +788,10 @@ def process_run(run):
|
|||
style = self.styles.resolve_paragraph(p)
|
||||
if has_visible_border is None:
|
||||
has_visible_border = style.has_visible_border()
|
||||
max_left, max_right = max(style.margin_left, max_left), max(style.margin_right, max_right)
|
||||
if isinstance(style.margin_left, numbers.Number):
|
||||
max_left = max(style.margin_left, max_left)
|
||||
if isinstance(style.margin_right, numbers.Number):
|
||||
max_right = max(style.margin_right, max_right)
|
||||
if has_visible_border:
|
||||
style.margin_left = style.margin_right = inherit
|
||||
if p is not run[0]:
|
||||
|
|
|
|||
Loading…
Reference in a new issue