summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorRadek Novacek <rnovacek@redhat.com>2014-01-23 10:36:10 +0100
committerRadek Novacek <rnovacek@redhat.com>2014-01-23 15:01:19 +0100
commit38be1e0bdd09a5a94bc9e9c3bdadd56023095a95 (patch)
tree40278a5494de0fef0b8e7bedae887c2464042fa2 /tools
parent816ba0e5be13ced62ec7aa6978f9e34818a299b2 (diff)
downloadopenlmi-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-xtools/help2rst6
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