diff --git a/CHANGES b/CHANGES index 4d221160d..73048c3ff 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ Release 1.0 (in development) ============================ +* #129: Wrap toctrees in a div tag with class ``toctree-wrapper`` + in HTML output. + * #280: Autodoc can now document instance attributes assigned in ``__init__`` methods. diff --git a/sphinx/directives/other.py b/sphinx/directives/other.py index 1c8311587..d746ea625 100644 --- a/sphinx/directives/other.py +++ b/sphinx/directives/other.py @@ -100,7 +100,9 @@ class TocTree(Directive): subnode['hidden'] = 'hidden' in self.options subnode['numbered'] = 'numbered' in self.options subnode['titlesonly'] = 'titlesonly' in self.options - ret.append(subnode) + wrappernode = nodes.compound(classes=['toctree-wrapper']) + wrappernode.append(subnode) + ret.append(wrappernode) return ret