showdown icon indicating copy to clipboard operation
showdown copied to clipboard

Cannot pass extra options in cli tool

Open dominic-simplan opened this issue 2 years ago • 2 comments

It seems that I cannot pass extra options when using showdown 2.0.3 as a CLI tool:

Installed showdown globally: npm install showdown -g

Run example command from wiki (https://github.com/showdownjs/showdown/wiki/CLI-tool#extra-options): showdown makehtml -i foo.md -o bar.html --strikethrough

Result: error: unknown option '--strikethrough'

Seems to work correctly with 1.9.1.

dominic-simplan avatar Apr 20 '22 13:04 dominic-simplan

There was a breaking change in version 2 that we forgot to document.

To pass extra options the command should be:

showdown makehtml -i foo.md -o bar.html -c strikethrough

to pass multiple options:

showdown makehtml -i foo.md -o bar.html -c strikethrough -c emoji

I've updated the wiki to reflect this.

Sorry about the mess up

tivie avatar Apr 21 '22 00:04 tivie

released version 2.1.0 which documents the breaking change.

tivie avatar Apr 21 '22 00:04 tivie