mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Conversion: Fix incorrect conversion of east-asian characters in CSS class names. Fixes #1390527 [lost the style's names when converting to another format](https://bugs.launchpad.net/calibre/+bug/1390527)
This commit is contained in:
parent
e6f4c169d9
commit
b20088191e
@ -474,7 +474,7 @@ class CSSFlattener(object):
|
||||
# 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()
|
||||
klass = ascii_text(STRIPNUM.sub('', classes.split()[0])).lower().strip().replace(' ', '_')
|
||||
if css in styles:
|
||||
match = styles[css]
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user