showdownjs / showdown

A bidirectional Markdown to HTML to Markdown converter written in Javascript
http://www.showdownjs.com/
MIT License
14.26k stars 1.56k forks source link

Cannot pass extra options in cli tool #916

Open dominic-simplan opened 2 years ago

dominic-simplan commented 2 years ago

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.

tivie commented 2 years ago

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 commented 2 years ago

released version 2.1.0 which documents the breaking change.