Skip to content

Commit

Permalink
Make option regex more robust for different help formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Stuart Teasdale committed Oct 16, 2018
1 parent f80b5ab commit 33faac1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/help_to_latex.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def tokenise_boost_cpp_help(message):
('empty', re.compile('^$')),
('section', re.compile('^(?P<name>.*):$')),
('option', re.compile(
'^ (?P<name>\S+) (?P<argspec>\S+( \S+)*)(?: *(?P<desc>.*))?$')),
'^ (?P<name>\S+) (?P<argspec>( ?arg| ?\[.*?\]| ?\(.*?\))*)(?: +(?P<desc>.*))?$')),
# intented text will be at least 3 spaces, exact number is
# data-dependent
('indented', re.compile('^ {3,}(?P<text>.*)$')),
Expand Down

0 comments on commit 33faac1

Please sign in to comment.