Commits

dan mackinlay committed 16706d7

fix sundry bugs in the Latest directive and fork it from Toctree

  • Participants
  • Parent commits 8e6890a

Comments (0)

Files changed (2)

File feed/setup.py

 
 setup(
     name='feed',
-    version='0.2',
+    version='0.3',
     url='http://bitbucket.org/birkenfeld/sphinx-contrib',
     # download_url='http://pypi.python.org/pypi/feed',
     license='BSD',

File feed/sphinxcontrib/feed/feeddirectives.py

     Directive to notify Sphinx about the hierarchical structure of the docs,
     and to include a table-of-contents-like tree in the current document.
     
-    Used to be subclassed of TocTree, but now heavily modified from it, to
-    avoid tedious bugs from TocTree's rather special role.
+    Used to be subclassed of TocTree, but now modified from it, to avoid
+    tedious bugs from TocTree's rather special role, and depending upon
+    private Sphinx APIs.
     """
     has_content = True
     required_arguments = 0
     optional_arguments = 0
     final_argument_whitespace = False
+    
     option_spec = {
         # 'maxdepth': int,
         'glob': directives.flag,
         all_docnames = env.found_docs.copy()
         # don't add the currently visited file in catch-all patterns
         all_docnames.remove(env.docname)
+        
+        ret = []
+        
         for entry in self.content:
             if not entry:
                 continue
         set_source_info(self, subnode)
         wrappernode = nodes.compound(classes=['latest-wrapper'])
         wrappernode.append(subnode)
-        return [wrappernode]
+        ret.append(wrappernode)
+        return ret