mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Sphinx generates broken ePub on Windows. Closes #1232
This commit is contained in:
1
CHANGES
1
CHANGES
@@ -42,6 +42,7 @@ Bugs fixed
|
||||
footnote and auto symbol footnote.
|
||||
* PR#146,#1172: Fix ZeroDivisionError in Parallel Builds. Thanks to tychoish.
|
||||
* #1206: Fix i18n: gettext did not translate admonition directive's title.
|
||||
* #1232: Sphinx generates broken ePub on Windows.
|
||||
|
||||
|
||||
Release 1.2 (beta1 released Mar 31, 2013)
|
||||
|
||||
@@ -538,6 +538,7 @@ class EpubBuilder(StandaloneHTMLBuilder):
|
||||
if ext not in ('.js', '.xml'):
|
||||
self.warn('unknown mimetype for %s, ignoring' % filename)
|
||||
continue
|
||||
filename = filename.replace(os.sep, '/')
|
||||
projectfiles.append(_file_template % {
|
||||
'href': self.esc(filename),
|
||||
'id': self.esc(self.make_id(filename)),
|
||||
@@ -569,6 +570,7 @@ class EpubBuilder(StandaloneHTMLBuilder):
|
||||
html_tmpl = None
|
||||
if self.config.epub_cover:
|
||||
image, html_tmpl = self.config.epub_cover
|
||||
image = image.replace(os.sep, '/')
|
||||
mpos = content_tmpl.rfind('</metadata>')
|
||||
cpos = content_tmpl.rfind('\n', 0 , mpos) + 1
|
||||
content_tmpl = content_tmpl[:cpos] + \
|
||||
|
||||
Reference in New Issue
Block a user