forked from LiveCarta/BookConverter
epub converter: fix tables
This commit is contained in:
@@ -95,13 +95,14 @@ def preprocess_table(body_tag: BeautifulSoup):
|
|||||||
|
|
||||||
width = td.get('width') or width
|
width = td.get('width') or width
|
||||||
|
|
||||||
td.attrs = {}
|
|
||||||
if width:
|
if width:
|
||||||
td.attrs['width'] = width
|
td.attrs['width'] = width
|
||||||
|
|
||||||
if border_sizes:
|
if border_sizes:
|
||||||
border_size = sum(border_sizes) / len(border_sizes)
|
border_size = sum(border_sizes) / len(border_sizes)
|
||||||
table.attrs['border'] = f'{border_size:.2}'
|
table.attrs['border'] = f'{border_size:.2}'
|
||||||
|
else:
|
||||||
|
table.attrs['border'] = '1'
|
||||||
|
|
||||||
|
|
||||||
def _process_lists(body_tag):
|
def _process_lists(body_tag):
|
||||||
|
|||||||
Reference in New Issue
Block a user