Skip to content

Commit

Permalink
docs: updated cli page to describe the updated format of passing extr…
Browse files Browse the repository at this point in the history
…a options
  • Loading branch information
bandantonio committed Apr 23, 2022
1 parent 3e1731f commit 9e5d0f3
Showing 1 changed file with 32 additions and 7 deletions.
39 changes: 32 additions & 7 deletions docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,19 +152,44 @@ showdown makehtml [options]
showdown makehtml -e ~/twitter.js -e ~/youtube.js
```

###### `-c/--config`

* Short format: `-c`
* Alias: `--config`
* Description: Enable or disable parser options.
* Introduced in: `2.0.1` (Breaking change. See the [`Extra options`](#extra-options) section below)
* Example:

!!! example ""

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

## Extra options

You can specify any of the [supported options](available-options.md), and they will be passed to the converter.
For example, you can enable strikethrough support via the following command:
Starting from the version `2.0.1`, CLI the format of passing extra options has changed. Please make the necessary changes to your code, if required.

```
showdown makehtml -i foo.md -o bar.html --strikethrough
```
=== "since `v2.0.1`"

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

=== "before `v2.0.1`"

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


You can specify any of the [supported options](available-options.md), and they will be passed to the converter.

this command is equivalent of doing:
The above commands are equivalent of doing:

```js
var conv = new showdown.Converter({strikethrough: true});
var conv = new showdown.Converter({strikethrough: true, emoji: true});
```

!!! warning ""
Expand Down

0 comments on commit 9e5d0f3

Please sign in to comment.