docs: added page about flavors

This commit is contained in:
Antonio 2022-03-30 01:27:06 +03:00
parent a1bb3e0a9b
commit 8d9b8f2f92
2 changed files with 25 additions and 1 deletions

23
docs/flavors.md Normal file
View File

@ -0,0 +1,23 @@
## Overview
You can use _flavors_ (or presets) to set the preferred options automatically. In this way, Showdown behaves like popular Markdown flavors.
Currently, the following flavors are available:
* `original`: Original Markdown flavor as in [John Gruber's spec](https://daringfireball.net/projects/markdown/)
* `vanilla`: Showdown base flavor (v1.3.1 onwards)
* `github`: [GitHub Flavored Markdown, or GFM](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax)
## Set flavor
=== "Globally"
```js
showdown.setFlavor('github');
```
=== "Locally"
```js
converter.setFlavor('github');
```

View File

@ -36,3 +36,4 @@ nav:
- Configuration: - Configuration:
- Showdown options: configuration.md - Showdown options: configuration.md
- Available options: available-options.md - Available options: available-options.md
- Flavors: flavors.md