diff --git a/src/cli/cli.js b/src/cli/cli.js index 3a8a607..f16e6f9 100644 --- a/src/cli/cli.js +++ b/src/cli/cli.js @@ -52,7 +52,7 @@ program.command('makehtml') .option('-a, --append', 'Append data to output instead of overwriting. Ignored if writing to stdout', false) .option('-e, --extensions ', 'Load the specified extensions. Should be valid paths to node compatible extensions') .option('-p, --flavor ', 'Run with a predetermined flavor of options. Default is vanilla', 'vanilla') - .option('-c, --config ', 'Enables showdown makehtml parser config options. Overrides flavor') + .option('-c, --config ', 'Enables showdown makehtml parser config options (example: strikethrough). Overrides flavor') .option('--config-help', 'Shows configuration options for showdown parser') .action(makehtmlCommand); diff --git a/test/node/testsuite.cli.js b/test/node/testsuite.cli.js index 02d372a..8c9e8f5 100644 --- a/test/node/testsuite.cli.js +++ b/test/node/testsuite.cli.js @@ -128,6 +128,16 @@ describe('showdown cli', function () { proc.stdout.should.equal('

this is a 😄

'); }); + it('should enable 2 showdown options (emoji and strikethrough)', function () { + var proc = spawnCLI('makehtml', ['-c', 'emoji', '-c', 'strikethrough'], { + input: 'this is ~~not~~ a :smile:', + encoding: 'utf-8' + }); + proc.status.should.equal(0); + proc.stderr.should.contain('Enabling option emoji'); + proc.stdout.should.equal('

this is not a 😄

'); + }); + it('should ignore unrecognized options', function () { var proc = spawnCLI('makehtml', ['-c', 'foobar'], { input: 'foo',