mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #3058: Using the same 'caption' attribute in multiple 'toctree' directives results in warning / error
This commit is contained in:
parent
cb5e09ffe1
commit
4411f677cf
2
CHANGES
2
CHANGES
@ -5,6 +5,8 @@ Bugs fixed
|
||||
----------
|
||||
|
||||
* #2936: Fix doc/Makefile that can't build man because doc/man exists
|
||||
* #3058: Using the same 'caption' attribute in multiple 'toctree' directives
|
||||
results in warning / error
|
||||
|
||||
Release 1.4.8 (released Oct 1, 2016)
|
||||
====================================
|
||||
|
@ -52,9 +52,6 @@ class TocTree(Directive):
|
||||
env = self.state.document.settings.env
|
||||
suffixes = env.config.source_suffix
|
||||
glob = 'glob' in self.options
|
||||
caption = self.options.get('caption')
|
||||
if caption:
|
||||
self.options.setdefault('name', nodes.fully_normalize_name(caption))
|
||||
|
||||
ret = []
|
||||
# (title, ref) pairs, where ref may be a document, or an external link,
|
||||
@ -113,7 +110,7 @@ class TocTree(Directive):
|
||||
# includefiles only entries that are documents
|
||||
subnode['includefiles'] = includefiles
|
||||
subnode['maxdepth'] = self.options.get('maxdepth', -1)
|
||||
subnode['caption'] = caption
|
||||
subnode['caption'] = self.options.get('caption')
|
||||
subnode['glob'] = glob
|
||||
subnode['hidden'] = 'hidden' in self.options
|
||||
subnode['includehidden'] = 'includehidden' in self.options
|
||||
|
Loading…
Reference in New Issue
Block a user