From 6cca6c443f29fb34797d074f1da1ae9dcca397a7 Mon Sep 17 00:00:00 2001 From: Michal Minar Date: Mon, 24 Feb 2014 14:44:06 +0100 Subject: tools: allow Commands section to be omitted --- tools/help2rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tools') diff --git a/tools/help2rst b/tools/help2rst index bb2df8c..7dce05c 100755 --- a/tools/help2rst +++ b/tools/help2rst @@ -96,12 +96,12 @@ def process_usage_line(line): Parsing usage strings after 'Usage:' and before 'Commands:'. Just add formatting to usage strings. """ - if line.startswith("Commands:"): + if line.startswith("Commands:") or line.startswith('Options:'): print - print "**Commands:**" + print "**Commands:**" if line.startswith("Commands") else "**Options:**" print return process_commands_line - + # -o and --options should be bold, but they must *not* be preceeded # by [a-z] character. # I.e. 'partition-table' should be skipped, while '--option' should -- cgit