summaryrefslogtreecommitdiff
path: root/sphinx
diff options
context:
space:
mode:
authorJonathan Waltman <jonathan.waltman@gmail.com>2013-01-07 22:12:03 -0600
committerJonathan Waltman <jonathan.waltman@gmail.com>2013-01-07 22:12:03 -0600
commitc22800e27d05ae25a07869e64cc95ed2373ceab4 (patch)
treeee22a239517ce59fb284429e82c41f4c2cdde27d /sphinx
parent9614376a755a21419007f1e33f62a5f734ef4a26 (diff)
parent5c58d248d1798c24f5ca71b923416129909326be (diff)
downloadsphinx-c22800e27d05ae25a07869e64cc95ed2373ceab4.tar.gz
Merged in rolmei/sphinx-epub (pull request #106: Add includehidden option to the toctree directive)
Diffstat (limited to 'sphinx')
-rw-r--r--sphinx/directives/other.py2
-rw-r--r--sphinx/environment.py2
2 files changed, 4 insertions, 0 deletions
diff --git a/sphinx/directives/other.py b/sphinx/directives/other.py
index 3167d606..75a19915 100644
--- a/sphinx/directives/other.py
+++ b/sphinx/directives/other.py
@@ -43,6 +43,7 @@ class TocTree(Directive):
'maxdepth': int,
'glob': directives.flag,
'hidden': directives.flag,
+ 'includehidden': directives.flag,
'numbered': int_or_nothing,
'titlesonly': directives.flag,
}
@@ -108,6 +109,7 @@ class TocTree(Directive):
subnode['maxdepth'] = self.options.get('maxdepth', -1)
subnode['glob'] = glob
subnode['hidden'] = 'hidden' in self.options
+ subnode['includehidden'] = 'includehidden' in self.options
subnode['numbered'] = self.options.get('numbered', 0)
subnode['titlesonly'] = 'titlesonly' in self.options
set_source_info(self, subnode)
diff --git a/sphinx/environment.py b/sphinx/environment.py
index 4efea83d..a08d671a 100644
--- a/sphinx/environment.py
+++ b/sphinx/environment.py
@@ -1514,6 +1514,8 @@ class BuildEnvironment:
maxdepth = maxdepth or toctree.get('maxdepth', -1)
if not titles_only and toctree.get('titlesonly', False):
titles_only = True
+ if not includehidden and toctree.get('includehidden', False):
+ includehidden = True
# NOTE: previously, this was separate=True, but that leads to artificial
# separation when two or more toctree entries form a logical unit, so