chore: update REAMDE.md to include reference to flavors

This commit is contained in:
Estevão Soares dos Santos 2016-11-29 03:19:35 +00:00 committed by GitHub
parent 5d57d71ef7
commit e00d270383

View File

@ -262,7 +262,27 @@ var defaultOptions = showdown.getDefaultOptions();
* **disableForced4SpacesIndentedSublists**: (boolean) [default false] Disables the requirement of indenting sublists by 4 spaces for them to be nested, * **disableForced4SpacesIndentedSublists**: (boolean) [default false] Disables the requirement of indenting sublists by 4 spaces for them to be nested,
effectively reverting to the old behavior where 2 or 3 spaces were enough. (since v1.5.0) effectively reverting to the old behavior where 2 or 3 spaces were enough. (since v1.5.0)
## Flavors
You can also use flavors or presets to set the correct options automatically, so that showdown behaves like popular markdown flavors.
Currently, there are two flavors available:
* github - GFM (GitHub Flavored Markdown)
* vanilla - original markdown flavor
### Global
```javascript
showdown.setFlavor('github');
```
### Instance
```javascript
converter.setFlavor('github');
```
## CLI Tool ## CLI Tool
Showdown also comes bundled with a Command Line Interface tool. You can check the [CLI wiki page][cli-wiki] for more info Showdown also comes bundled with a Command Line Interface tool. You can check the [CLI wiki page][cli-wiki] for more info
@ -388,4 +408,4 @@ Showdown is powered by:<br/>
[ext-wiki]: https://github.com/showdownjs/showdown/wiki/extensions [ext-wiki]: https://github.com/showdownjs/showdown/wiki/extensions
[coding-rules]: https://github.com/showdownjs/code-style/blob/master/README.md [coding-rules]: https://github.com/showdownjs/code-style/blob/master/README.md
[ng-commit-guide]: https://github.com/showdownjs/code-style/blob/master/README.md#commit-message-convention [ng-commit-guide]: https://github.com/showdownjs/code-style/blob/master/README.md#commit-message-convention
[boilerplate-repo]: https://github.com/showdownjs/extension-boilerplate [boilerplate-repo]: https://github.com/showdownjs/extension-boilerplate