diff --git a/CHANGES b/CHANGES index ab286cde8..600d9904b 100644 --- a/CHANGES +++ b/CHANGES @@ -1,11 +1,17 @@ -Release 0.3 (TBA) -================= +Changes in trunk +================ New features added ------------------ -* If the `pygments_style` contains a dot it's treated as import path and - used as style class. +* If the `pygments_style` config value contains a dot it's treated as the + import path of a custom Pygments style class. + +Bugs fixed +---------- + +* sphinx.htmlwriter: Correctly write the TOC file for any structure of the + master document. Release 0.2 (Apr 27, 2008) diff --git a/sphinx/environment.py b/sphinx/environment.py index 859be5895..a7b0931d8 100644 --- a/sphinx/environment.py +++ b/sphinx/environment.py @@ -700,7 +700,7 @@ class BuildEnvironment: stream=RedirStream(self._warnfunc)) return doctree - def get_and_resolve_doctree(self, docname, builder, doctree=None): + def get_and_resolve_doctree(self, docname, builder, doctree=None, prune_toctrees=True): """Read the doctree from the pickle, resolve cross-references and toctrees and return it.""" if doctree is None: @@ -753,8 +753,9 @@ class BuildEnvironment: tocentries = _entries_from_toctree(toctreenode, separate=True) if tocentries: newnode = addnodes.compact_paragraph('', '', *tocentries) + newnode['toctree'] = True # prune the tree to maxdepth and replace titles - if maxdepth > 0: + if maxdepth > 0 and prune_toctrees: _walk_depth(newnode, 1, maxdepth, titleoverrides) # replace titles, if needed if titleoverrides: diff --git a/sphinx/htmlhelp.py b/sphinx/htmlhelp.py index b3bbd4f63..7ad6b2e70 100644 --- a/sphinx/htmlhelp.py +++ b/sphinx/htmlhelp.py @@ -150,7 +150,8 @@ def build_hhx(builder, outdir, outname): if builder.config.html_use_modindex: f.write('