Fixed a bunch of docs errors with Usage headers.

This commit is contained in:
Garth Minette
2020-10-03 20:29:35 -07:00
parent 16ee49e8b2
commit 38873d8ef9
9 changed files with 51 additions and 27 deletions

View File

@@ -405,6 +405,10 @@ class LeafNode(object):
dummy, title = line.split(":", 1)
title = title.strip()
lines, block = get_comment_block(lines, prefix)
if block == []:
print("Error: Usage header without any usage examples.")
print(line)
sys.exit(-2)
self.usages.append([title, block])
continue
if line.startswith("Description:"):