Skip to content

Extra newlines break docopt #12

Open
@NateEag

Description

@NateEag

Running the following program resulted in no output:

#! /usr/bin/env node

var docopt = require('docopt');

var doc = 'Usage:\n\n' +
           '  test.js [options] [<example-name>...]\n' +
           'Options:\n' +
           '  --url=url        URL to run the tests on.\n';

var options = docopt.docopt(doc);

I removed the second \n from the first line of the usage string, then the message was output as I expected when I ran the program.

This is with docopt 0.4.1, installed via npm.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions