mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
134184eb1d
commit
8d0689eda1
@ -463,6 +463,9 @@ 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'
|
||||
# lower() because otherwise if the document uses the same class
|
||||
# name with different case, both cases will apply, leading
|
||||
# to incorrect results.
|
||||
klass = ascii_text(STRIPNUM.sub('', classes.split()[0])).lower()
|
||||
if css in styles:
|
||||
match = styles[css]
|
||||
|
Loading…
x
Reference in New Issue
Block a user