docopt.coffee icon indicating copy to clipboard operation
docopt.coffee copied to clipboard

Extra newlines break docopt

Open NateEag opened this issue 11 years ago • 0 comments

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.

NateEag avatar Feb 01 '15 16:02 NateEag