mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Edit Book: Fix an error when running the Check Book tool on files with empty <style> tags. Fixes #1320459 [Private bug](https://bugs.launchpad.net/calibre/+bug/1320459)
This commit is contained in:
parent
6f6812ccd7
commit
15698f60a7
@ -111,7 +111,7 @@ def check_fonts(container):
|
|||||||
sheets.append((name, container.parsed(name), None))
|
sheets.append((name, container.parsed(name), None))
|
||||||
elif mt in OEB_DOCS:
|
elif mt in OEB_DOCS:
|
||||||
for style in container.parsed(name).xpath('//*[local-name()="style"]'):
|
for style in container.parsed(name).xpath('//*[local-name()="style"]'):
|
||||||
if style.get('type', 'text/css') == 'text/css':
|
if style.get('type', 'text/css') == 'text/css' and style.text:
|
||||||
sheets.append((name, container.parse_css(style.text), style.sourceline))
|
sheets.append((name, container.parse_css(style.text), style.sourceline))
|
||||||
|
|
||||||
for name, sheet, line_offset in sheets:
|
for name, sheet, line_offset in sheets:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user