Skip to content

Flavors

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:

Options activated by each flavor

A flavor is simply a bundle of option overrides applied on top of Showdown's defaults. The table below lists every option that at least one flavor sets:

  • vanilla applies no overrides of its own — its column shows the plain Showdown defaults.

Legend: ✅ = on · ❌ = off · (blank) = off (default).

Option vanilla original gfm commonmark
noHeaderId
requireSpaceBeforeHeadingText
ghCodeBlocks
strikethrough
omitExtraWLInCodeBlocks
simplifiedAutoLink
literalMidWordUnderscores
tables
tablesHeaderId
tasklists
disableForced4SpacesIndentedSublists
ghMentions
backslashEscapesHTMLTags
emoji
splitAdjacentBlockquotes
decodeEntities
cmSpec

Note

ghCodeBlocks defaults to on, so vanilla, gfm and commonmark all keep GFM fenced code blocks enabled; only original turns them off. strikethrough likewise defaults to on (enabled in vanilla and gfm); the spec-oriented original and commonmark flavors turn it off.

Set flavor

showdown.setFlavor('gfm');
converter.setFlavor('gfm');

github alias

github is kept as a backwards-compatible alias for gfm, so setFlavor('github') and getFlavorOptions('github') keep working and return the same options. getFlavors() lists both names. New code should prefer gfm.