Skip to content

Commit

Permalink
E-book viewer: Speed up initial render of books with lots of CSS by n…
Browse files Browse the repository at this point in the history
…ot prettying the CSS

Also works around a bug in css-parser where prettying certain types of
stylesheets breaks them.
  • Loading branch information
kovidgoyal committed Jul 31, 2022
1 parent d130d81 commit 6535d9a
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/calibre/srv/render_book.py
Expand Up @@ -26,7 +26,6 @@
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
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 6535d9a

Please sign in to comment.