Skip to content

Commit

Permalink
feat(flavor: ghost): add Ghost flavor
Browse files Browse the repository at this point in the history
  • Loading branch information
tivie committed Feb 6, 2017
1 parent 4a88db3 commit 6374b5b
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 7 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -310,10 +310,12 @@ var defaultOptions = showdown.getDefaultOptions();
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:
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 (as from v1.3.1)
* github - GFM (GitHub Flavored Markdown)

* github - GFM (GitHub Flavored Markdown)
* vanilla - original markdown flavor

### Global
```javascript
Expand Down
17 changes: 17 additions & 0 deletions dist/showdown.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/showdown.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/showdown.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/showdown.min.js.map

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions src/showdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,23 @@ var showdown = {},
noHeaderId: true,
ghCodeBlocks: false
},
ghost: {
omitExtraWLInCodeBlocks: true,
parseImgDimensions: true,
simplifiedAutoLink: true,
excludeTrailingPunctuationFromURLs: true,
literalMidWordUnderscores: true,
strikethrough: true,
tables: true,
tablesHeaderId: true,
ghCodeBlocks: true,
tasklists: true,
smoothLivePreview: true,
simpleLineBreaks: true,
requireSpaceBeforeHeadingText: true,
ghMentions: false,
encodeEmails: true
},
vanilla: getDefaultOpts(true),
allOn: allOptionsOn()
};
Expand Down

0 comments on commit 6374b5b

Please sign in to comment.