Skip to content

Commit 6d74b4e

Browse files
jeplerdpgeorge
authored andcommitted
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 <[email protected]>
1 parent ea19f3b commit 6d74b4e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tools/gen-cpydiff.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,8 @@ def gen_rst(results):
219219
class_ = []
220220
for output in results:
221221
section = output.class_.split(",")
222+
if len(section) < 2:
223+
raise SystemExit("Each item must have at least 2 categories")
222224
for i in range(len(section)):
223225
section[i] = section[i].rstrip()
224226
if section[i] in CLASSMAP:

0 commit comments

Comments
 (0)