File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,9 +23,9 @@ def extract(manpage):
2323opt_regex = re .compile (r'''
2424 (?P<opt>--?(?:\?|\#|(?:\w+-)*\w+)) # option starts with - or -- and can have - in the middle but not at the end, also allow '-?'
2525 (?:
26- (?:\s* (=)?\s* ) # -a=
26+ (?:\s? (=)?\s? ) # -a=
2727 (?P<argoptional>[<\[])? # -a=< or -a=[
28- (?:\s* (=)?\s* ) # or maybe -a<=
28+ (?:\s? (=)?\s? ) # or maybe -a<=
2929 (?P<arg>
3030 (?(argoptional) # if we think we have an arg (we saw [ or <)
3131 [^\]>]+ # either read everything until the closing ] or >
@@ -39,7 +39,7 @@ def extract(manpage):
3939 )
4040 (?(argoptional)(?P<argoptionalc>[\]>])) # read closing ] or > if we have an arg
4141 )? # the whole arg thing is optional
42- (?P<ending>,\s*|\s+|\Z|/|\|)''' , re .X ) # read any trailing whitespace or the end of the string
42+ (?P<ending>,\s*|\s+|\Z|/|\|)''' , re .X ) # read any trailing whitespace or the end of the string
4343
4444opt2_regex = re .compile (r'''
4545 (?P<opt>\w+) # an option that doesn't start with any of the usual characters, e.g. options from 'dd' like bs=BYTES
You can’t perform that action at this time.
0 commit comments