Skip to content

Commit ea2be50

Browse files
authored
Added support for C++ libs that do not match EOL
As explained in https://stackoverflow.com/questions/39645660/stdregex-to-match-begin-end-of-string this helps when running on c++ libraries that do not match EOL with $.
1 parent 8c506d8 commit ea2be50

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docopt_private.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ namespace docopt {
532532
options_end = option_description.begin() + static_cast<std::ptrdiff_t>(double_space);
533533
}
534534

535-
static const std::regex pattern {"(-{1,2})?(.*?)([,= ]|$)"};
535+
static const std::regex pattern {"(-{1,2})?(.*?)([,= ]|$|\n)"};
536536
for(std::sregex_iterator i {option_description.begin(), options_end, pattern, std::regex_constants::match_not_null},
537537
e{};
538538
i != e;

0 commit comments

Comments
 (0)