mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #1261 (html2epub doesn't support CJK characters in css style)
This commit is contained in:
parent
c4a744bc9a
commit
fce9c87251
@ -121,7 +121,10 @@ def parse_content(filelist, opts, tdir):
|
||||
if opts.base_font_size2 > 0:
|
||||
Rationalizer.remove_font_size_information(stylesheets.values())
|
||||
for path, css in stylesheets.items():
|
||||
open(path, 'wb').write(getattr(css, 'cssText', css).encode('utf-8'))
|
||||
raw = getattr(css, 'cssText', css)
|
||||
if isinstance(raw, unicode):
|
||||
raw = raw.encode('utf-8')
|
||||
open(path, 'wb').write(raw)
|
||||
if toc.count('chapter') > opts.toc_threshold:
|
||||
toc.purge(['file', 'link', 'unknown'])
|
||||
if toc.count('chapter') + toc.count('file') > opts.toc_threshold:
|
||||
|
Loading…
x
Reference in New Issue
Block a user