diff --git a/CHANGES b/CHANGES index d75546c6b..0ed869b50 100644 --- a/CHANGES +++ b/CHANGES @@ -219,6 +219,7 @@ Bugs fixed * #3614: Sphinx crashes with requests-2.5.0 * #3618: autodoc crashes with tupled arguments * #3664: No space after the bullet in items of a latex list produced by Sphinx +* #3657: EPUB builder crashes if document startswith genindex exists Testing -------- diff --git a/doc/_templates/indexsidebar.html b/doc/_templates/indexsidebar.html index bfa0139cb..6359921a5 100644 --- a/doc/_templates/indexsidebar.html +++ b/doc/_templates/indexsidebar.html @@ -3,7 +3,7 @@ {%trans%}project{%endtrans%}
{%trans%}This documentation is for version {{ version }}, which is not released yet.{%endtrans%}
{%trans%}You can use it from the diff --git a/doc/conf.py b/doc/conf.py index 95d14ec46..6817af12a 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -16,7 +16,7 @@ exclude_patterns = ['_build'] project = 'Sphinx' copyright = '2007-2017, Georg Brandl and the Sphinx team' -version = sphinx.__released__ +version = sphinx.__display_version__ release = version show_authors = True diff --git a/sphinx/builders/_epub_base.py b/sphinx/builders/_epub_base.py index a63ecbc39..699b0d265 100644 --- a/sphinx/builders/_epub_base.py +++ b/sphinx/builders/_epub_base.py @@ -449,7 +449,7 @@ class EpubBuilder(StandaloneHTMLBuilder): This method is overwritten for genindex pages in order to fix href link attributes. """ - if pagename.startswith('genindex'): + if pagename.startswith('genindex') and 'genindexentries' in addctx: if not self.use_index: return self.fix_genindex(addctx['genindexentries'])