From c91bb61d6f9f09061ed23776ecb78b717238a9ae Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 1 Mar 2014 10:27:05 +0530 Subject: [PATCH] Fix a regression in 1.26 that caused width and height attributes on tags to generate CSS width and height properties without a 'px' suffix --- src/calibre/ebooks/oeb/stylizer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/ebooks/oeb/stylizer.py b/src/calibre/ebooks/oeb/stylizer.py index c720f65c01..6241ddd07f 100644 --- a/src/calibre/ebooks/oeb/stylizer.py +++ b/src/calibre/ebooks/oeb/stylizer.py @@ -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'[0-9.]$') + 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