From 134184eb1d188b89fae5112a97c6cb67000c6d29 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 2 Sep 2014 14:30:20 +0530 Subject: [PATCH] Conversion: Fix incorrect conversion of CSS when the input document uses the same CSS class name in both upper and lower case. Fixes #1328552 [Private bug](https://bugs.launchpad.net/calibre/+bug/1328552) --- src/calibre/ebooks/oeb/transforms/flatcss.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/ebooks/oeb/transforms/flatcss.py b/src/calibre/ebooks/oeb/transforms/flatcss.py index 5761e8da3b..11a865b84f 100644 --- a/src/calibre/ebooks/oeb/transforms/flatcss.py +++ b/src/calibre/ebooks/oeb/transforms/flatcss.py @@ -463,7 +463,7 @@ class CSSFlattener(object): items = sorted(cssdict.iteritems()) css = u';\n'.join(u'%s: %s' % (key, val) for key, val in items) classes = node.get('class', '').strip() or 'calibre' - klass = ascii_text(STRIPNUM.sub('', classes.split()[0])) + klass = ascii_text(STRIPNUM.sub('', classes.split()[0])).lower() if css in styles: match = styles[css] else: