diff options
author | Radek Novacek <rnovacek@redhat.com> | 2014-01-23 10:36:10 +0100 |
---|---|---|
committer | Radek Novacek <rnovacek@redhat.com> | 2014-01-23 15:01:19 +0100 |
commit | 38be1e0bdd09a5a94bc9e9c3bdadd56023095a95 (patch) | |
tree | 40278a5494de0fef0b8e7bedae887c2464042fa2 /tools | |
parent | 816ba0e5be13ced62ec7aa6978f9e34818a299b2 (diff) | |
download | openlmi-scripts-38be1e0bdd09a5a94bc9e9c3bdadd56023095a95.tar.gz openlmi-scripts-38be1e0bdd09a5a94bc9e9c3bdadd56023095a95.tar.xz openlmi-scripts-38be1e0bdd09a5a94bc9e9c3bdadd56023095a95.zip |
Allow having numbers on the Usage line
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/help2rst | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/help2rst b/tools/help2rst index 124b5bc..e75455a 100755 --- a/tools/help2rst +++ b/tools/help2rst @@ -106,12 +106,12 @@ def process_usage_line(line): # by [a-z] character. # I.e. 'partition-table' should be skipped, while '--option' should # match. - line = re.sub(r'(?<![a-zA-Z])(-[\-a-zA-Z]+)', r'\\ **\1**\\ ', line) + line = re.sub(r'(?<![a-zA-Z0-9])(-[\-a-zA-Z0-9]+)', r'\\ **\1**\\ ', line) # '<arg>' is italics line = re.sub(r'(<[^>]*>)', r'\\ *\1*\\ ', line) # words alone are bold, they can also contain a dash ('partition-table') - line = re.sub(r'\s([a-zA-Z][a-zA-Z-]*)\s', r' **\1** ', line) - line = re.sub(r'\s([a-zA-Z][a-zA-Z-]*)\s', r' **\1** ', line) + line = re.sub(r'\s([a-zA-Z0-9][a-zA-Z0-9-]*)\s', r' **\1** ', line) + line = re.sub(r'\s([a-zA-Z0-9][a-zA-Z0-9-]*)\s', r' **\1** ', line) # There must be one line space before the option print |