Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty lines do not break options sections. #339

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

EVGVir
Copy link

@EVGVir EVGVir commented Aug 3, 2016

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

  • logically grouping;
  • aesthetic reasons.

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.

There are several reasons why an options section can be split by an
empty line, among them are:
- logically grouping;
- aesthetic reasons.

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.
)*
)$ # The section ends at the end of a line.
'''.format(name),
re.IGNORECASE | re.MULTILINE | re.VERBOSE)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[^\n] were replaced with just . because according to the Regular Expression Syntax:

(Dot.) In the default mode, this matches any character except a newline.

@EVGVir
Copy link
Author

EVGVir commented Aug 3, 2016

It looks like the checks have failed because of python version. The tests are passed on my machine with Python 2.7.10. Should I add a support of older version of Python (at least 2.6.9, I presume)?

By the way, there was a deprecation note:

py26 installed: DEPRECATION: Python 2.6 is no longer supported by the Python core team, please upgrade your Python. A future version of pip will drop support for Python 2.6,argparse==1.4.0,docopt==0.6.2,py==1.4.31,pytest==2.9.2

@EVGVir
Copy link
Author

EVGVir commented Aug 3, 2016

As far as I can see, support of Python 2.5 was dropped two years ago in 6879155. I have no idea about plans to support 2.6.

EVGVir added a commit to EVGVir/docopt.cpp that referenced this pull request Aug 4, 2016
The proposed changes for docopt can be found in the pull request
[339](docopt/docopt#339).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant