docopt / docopt.cpp

C++11 port of docopt
Boost Software License 1.0
1.05k stars 146 forks source link

Empty lines do not break options sections. #52

Open EVGVir opened 8 years ago

EVGVir commented 8 years ago

There are several reasons why an options section can be split by an empty line, among them are:

Such style is used, for example, in man program.

An example:

Options:
  --before-empty-lines  An option before empty lines.

  --after-empty-lines   An option after empty lines.
EVGVir commented 8 years ago

It is possible to play with this new regular expression here.

jaredgrubb commented 8 years ago

Although I think there's merit to this request, adding this test-case causes the Python version of docopt to fail. One of the missions is to maintain feature parity across the variants of docopt. Can you post this in the docopt-py forum; if it's accepted there, then I can accept your patch as the port of that feature.

EVGVir commented 8 years ago

I have created a pull request in the main docopt repository.

EVGVir commented 8 years ago

Something went wrong with Boost regexs. Other tests are okay.