Anonymous avatar Anonymous committed c762a15

Empty titles in epub_pre/post_files add no entry in toc.ncx.

Comments (0)

Files changed (2)

 
    Additional files that should be inserted before the text generated by
    Sphinx. It is a list of tuples containing the file name and the title.
-   Example::
+   If the title is empty, no entry is added to :file:`toc.ncx`.  Example::
 
       epub_pre_files = [
           ('index.html', 'Welcome'),
 
    Additional files that should be inserted after the text generated by Sphinx.
    It is a list of tuples containing the file name and the title.  This option
-   can be used to add an appendix.  The default value is ``[]``.
+   can be used to add an appendix.  If the title is empty, no entry is added
+   to :file:`toc.ncx`.  The default value is ``[]``.
 
 .. confval:: epub_exclude_files
 

sphinx/builders/epub.py

         level = 1
         lastnode = None
         for node in nodes:
+            if not node['text']:
+                continue
             file = node['refuri'].split('#')[0]
             if file in self.ignored_files:
                 continue
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.