mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
MOBI Output: Set the border attribute on tables if the CSS has border or border-width defined.
This commit is contained in:
parent
cab4eb9bd2
commit
7a97db1e36
@ -442,9 +442,12 @@ class MobiMLizer(object):
|
||||
if tag in TABLE_TAGS and self.ignore_tables:
|
||||
tag = 'span' if tag == 'td' else 'div'
|
||||
|
||||
# GR: Added 'width', 'border' and 'scope'
|
||||
if tag == 'table':
|
||||
css = style.cssdict()
|
||||
if 'border' in css or 'border-width' in css:
|
||||
elem.set('border', '1')
|
||||
if tag in TABLE_TAGS:
|
||||
for attr in ('rowspan', 'colspan','width','border','scope'):
|
||||
for attr in ('rowspan', 'colspan', 'width', 'border', 'scope'):
|
||||
if attr in elem.attrib:
|
||||
istate.attrib[attr] = elem.attrib[attr]
|
||||
if tag == 'q':
|
||||
|
Loading…
x
Reference in New Issue
Block a user