mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
Fix #1998 ([ERROR] CSSStyleRule: No start { of style declaration found:)
This commit is contained in:
parent
cfeaed5c71
commit
a6cf06dc25
@ -797,7 +797,8 @@ class Processor(Parser):
|
||||
self.external_stylesheets, self.stylesheet = [], self.css_parser.parseString('')
|
||||
self.specified_override_css = []
|
||||
for link in self.root.xpath('//link'):
|
||||
if 'css' in link.get('type', 'text/css').lower():
|
||||
ltype = link.get('type', link.get('rel', 'text/css')).lower()
|
||||
if 'css' in ltype or 'style' in ltype:
|
||||
file = os.path.join(self.tdir, *(link.get('href', '').split('/')))
|
||||
if file and not 'http:' in file:
|
||||
if not parsed_sheets.has_key(file):
|
||||
|
Loading…
x
Reference in New Issue
Block a user