mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
MOBI Output:Fix bug that cause MOBI conversion to sometimes fail when linking to an external stylesheet
This commit is contained in:
parent
8dd974ff42
commit
241a2fc099
@ -606,7 +606,7 @@ class Processor(Parser):
|
||||
elem.addprevious(mark)
|
||||
|
||||
def save(self, strip_comments=False):
|
||||
style_path = os.path.splitext(os.path.basename(self.save_path()))[0]
|
||||
style_path = os.path.splitext(os.path.basename(self.save_path()))[0]+'_calibre'
|
||||
for i, sheet in enumerate([self.stylesheet, self.font_css, self.override_css]):
|
||||
if sheet is not None:
|
||||
style = etree.SubElement(self.head, 'link', attrib={'type':'text/css', 'rel':'stylesheet',
|
||||
@ -826,7 +826,6 @@ class Processor(Parser):
|
||||
if parsed_sheets.has_key(file):
|
||||
self.external_stylesheets.append(parsed_sheets[file])
|
||||
|
||||
|
||||
for style in self.root.xpath('//style'):
|
||||
if 'css' in style.get('type', 'text/css').lower():
|
||||
override_css = style.get('title', '') == 'override_css'
|
||||
|
Loading…
x
Reference in New Issue
Block a user