Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot pass extra options in cli tool #916

Open
dominic-simplan opened this issue Apr 20, 2022 · 2 comments
Open

Cannot pass extra options in cli tool #916

dominic-simplan opened this issue Apr 20, 2022 · 2 comments
Assignees
Labels

Comments

@dominic-simplan
Copy link

dominic-simplan commented Apr 20, 2022

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 tivie self-assigned this Apr 20, 2022
@tivie tivie added the bug label Apr 20, 2022
@tivie
Copy link
Member

tivie commented Apr 21, 2022

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 added a commit that referenced this issue Apr 21, 2022
Note: there was a breaking change that we forgot to document. Ww write the breaking change here for it to be picked up in the future 3.0 release,
even though it was introduced in commit 3871765

BREAKING CHANGE: the CLI no longer accepts "extra options". Instead you should pass the `-c` flag. To update:

before:
```
showdown makehtml -i foo.md -o bar.html --strikethrough --emoji
```

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

Closes #916
tivie added a commit that referenced this issue Apr 21, 2022
Note: there was a breaking change that we forgot to document. Ww write the breaking change here for it to be picked up in the future 3.0 release,
even though it was introduced in commit 3871765

BREAKING CHANGE: the CLI no longer accepts "extra options". Instead you should pass the `-c` flag. To update:

before:
```
showdown makehtml -i foo.md -o bar.html --strikethrough --emoji
```

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

Closes #916
@tivie
Copy link
Member

tivie commented Apr 21, 2022

released version 2.1.0 which documents the breaking change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants