Conversion: Fix incorrect CSS being generated when converting files that have <img> tags with width or height attributes that contain fractional numbers. Fixes #1283108 [Private bug](https://bugs.launchpad.net/calibre/+bug/1283108)

This commit is contained in:
Kovid Goyal 2014-02-22 08:07:08 +05:30
parent f6b32541e6
commit 70779d9ff4

View File

@ -315,7 +315,7 @@ class Stylizer(object):
self.style(elem)._update_cssdict(cssdict)
for elem in xpath(tree, '//h:*[@style]'):
self.style(elem)._apply_style_attr(url_replacer=item.abshref)
num_pat = re.compile(r'\d+$')
num_pat = re.compile(r'[0-9.]$')
for elem in xpath(tree, '//h:img[@width or @height]'):
style = self.style(elem)
# Check if either height or width is not default