tools/gen-cpydiff.py: Ensure every item has at least 2 TOC levels.
Previously, the navigation ended up messy when the (long) description of the item became used as a 2nd level header, meaning that it was placed in the navigation. Check for this when generating cpydiff so that new cases don't sneak in unnoticed. Signed-off-by: Jeff Epler <jepler@gmail.com>
This commit is contained in:
parent
ea19f3b735
commit
6d74b4e3c1
1 changed files with 2 additions and 0 deletions
|
|
@ -219,6 +219,8 @@ def gen_rst(results):
|
|||
class_ = []
|
||||
for output in results:
|
||||
section = output.class_.split(",")
|
||||
if len(section) < 2:
|
||||
raise SystemExit("Each item must have at least 2 categories")
|
||||
for i in range(len(section)):
|
||||
section[i] = section[i].rstrip()
|
||||
if section[i] in CLASSMAP:
|
||||
|
|
|
|||
Loading…
Reference in a new issue