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)

This commit is contained in:
Kovid Goyal 2014-09-02 14:30:20 +05:30
parent 116ad0ac06
commit 134184eb1d

View File

@ -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: