mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
E-book viewer: Speed up initial render of books with lots of CSS by not prettying the CSS
Also works around a bug in css-parser where prettying certain types of stylesheets breaks them.
This commit is contained in:
parent
d130d81319
commit
6535d9acd2
@ -26,7 +26,6 @@ from calibre.ebooks.oeb.polish.container import Container as ContainerBase
|
||||
from calibre.ebooks.oeb.polish.cover import (
|
||||
find_cover_image, find_cover_image_in_page, find_cover_page
|
||||
)
|
||||
from calibre.ebooks.oeb.polish.pretty import pretty_script_or_style
|
||||
from calibre.ebooks.oeb.polish.toc import from_xpaths, get_landmarks, get_toc
|
||||
from calibre.ebooks.oeb.polish.utils import guess_type
|
||||
from calibre.ptempfile import PersistentTemporaryDirectory
|
||||
@ -334,7 +333,6 @@ def transform_inline_styles(container, name, transform_sheet, transform_style):
|
||||
if nraw != style.text:
|
||||
changed = True
|
||||
style.text = nraw
|
||||
pretty_script_or_style(container, style)
|
||||
for elem in root.xpath('//*[@style]'):
|
||||
text = elem.get('style', None)
|
||||
if text:
|
||||
|
Loading…
x
Reference in New Issue
Block a user