mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Use the same CSS serialization settings for conversion output as in the editor
This commit is contained in:
parent
4654159899
commit
d21e62c624
@ -426,6 +426,8 @@ def serialize(data, media_type, pretty_print=False):
|
||||
if isinstance(data, str):
|
||||
return data.encode('utf-8')
|
||||
if hasattr(data, 'cssText'):
|
||||
from calibre.ebooks.oeb.polish.utils import setup_css_parser_serialization
|
||||
setup_css_parser_serialization()
|
||||
data = data.cssText
|
||||
if isinstance(data, str):
|
||||
data = data.encode('utf-8')
|
||||
|
Loading…
x
Reference in New Issue
Block a user