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:
committed by
Damien George
parent
ea19f3b735
commit
6d74b4e3c1
@@ -219,6 +219,8 @@ def gen_rst(results):
|
|||||||
class_ = []
|
class_ = []
|
||||||
for output in results:
|
for output in results:
|
||||||
section = output.class_.split(",")
|
section = output.class_.split(",")
|
||||||
|
if len(section) < 2:
|
||||||
|
raise SystemExit("Each item must have at least 2 categories")
|
||||||
for i in range(len(section)):
|
for i in range(len(section)):
|
||||||
section[i] = section[i].rstrip()
|
section[i] = section[i].rstrip()
|
||||||
if section[i] in CLASSMAP:
|
if section[i] in CLASSMAP:
|
||||||
|
|||||||
Reference in New Issue
Block a user