Commit Graph

7 Commits

Author SHA1 Message Date
Takeshi KOMIYA
ac399b3b4e refactor tests for autosectionlabel 2019-02-11 18:34:04 +09:00
Takeshi KOMIYA
7770940af8 Merge branch 'master' into 4261_autosectionlabel_max_depth 2019-02-11 17:53:50 +09:00
Takeshi KOMIYA
114ff77f68 test: Omit master_doc settings from testcases 2019-01-03 10:58:42 +09:00
Takeshi KOMIYA
5428d94d24 Remove coding magic comments from tests 2019-01-02 21:53:07 +09:00
Kit La Touche
f21b9d5892 Use rawsource in autosectionlabel
Fixes #4027.
2018-02-11 13:52:27 +09:00
Roman Bogorodskiy
6bbfa9ac45 Add autosectionlabel_max_depth config option
This option defines maximum section depth that labels will be
generated for by the autosectionlabel extension.

This is useful when there are a lot of sections of the similar
structure, for example:

 Releases
 ========
 Release 1
 ---------
 Changes
 ^^^^^^^

 Date
 ^^^^

 ...

 Release N
 ---------
 Changes
 ^^^^^^^

 Date
 ^^^^

This way there'll be warnings about duplicate labels. Setting
autosectionlabel_max_depth allows to skip sections deeper than
'Releases' in the example above.

By default it's None, so things will not change and labels will
be generated for all sections unless configured otherwise.
2017-11-26 18:20:31 +04:00
Takeshi KOMIYA
7a4f914f91 Fix #1286, #2099: Add `sphinx.ext.autosectionlabel` extension to allow reference sections using its title 2016-02-14 16:30:57 +09:00