|
@ -50,7 +50,7 @@ var config = { |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* new MarkdownIt([presetName, options]) |
|
|
* new MarkdownIt([presetName, options]) |
|
|
* - presetName (String): optional, `commonmark` / `full` / `zero` |
|
|
* - presetName (String): optional, `commonmark` / `zero` |
|
|
* - options (Object) |
|
|
* - options (Object) |
|
|
* |
|
|
* |
|
|
* Creates parser instanse with given config. Can be called without `new`. |
|
|
* Creates parser instanse with given config. Can be called without `new`. |
|
@ -62,10 +62,9 @@ var config = { |
|
|
* |
|
|
* |
|
|
* - ["commonmark"](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/commonmark.js) -
|
|
|
* - ["commonmark"](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/commonmark.js) -
|
|
|
* configures parser to strict [CommonMark](http://commonmark.org/) mode.
|
|
|
* configures parser to strict [CommonMark](http://commonmark.org/) mode.
|
|
|
* - ["full"](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/full.js) -
|
|
|
|
|
|
* enables all available rules, but still without html, typographer & autolinker. |
|
|
|
|
|
* - [default](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/default.js) -
|
|
|
* - [default](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/default.js) -
|
|
|
* similar to GFM, used when no preset name given. |
|
|
* similar to GFM, used when no preset name given. Enables all available rules, |
|
|
|
|
|
* but still without html, typographer & autolinker. |
|
|
* - ["zero"](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/zero.js) -
|
|
|
* - ["zero"](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/zero.js) -
|
|
|
* all rules disabled. Useful to quickly setup your config via `.enable()`. |
|
|
* all rules disabled. Useful to quickly setup your config via `.enable()`. |
|
|
* For example, when you need only `bold` and `italic` markup and nothing else. |
|
|
* For example, when you need only `bold` and `italic` markup and nothing else. |
|
@ -102,7 +101,7 @@ var config = { |
|
|
* var md = require('markdown-it')(); |
|
|
* var md = require('markdown-it')(); |
|
|
* |
|
|
* |
|
|
* // enable everything
|
|
|
* // enable everything
|
|
|
* var md = require('markdown-it')('full', { |
|
|
* var md = require('markdown-it')({ |
|
|
* html: true, |
|
|
* html: true, |
|
|
* linkify: true, |
|
|
* linkify: true, |
|
|
* typographer: true |
|
|
* typographer: true |
|
@ -250,6 +249,9 @@ MarkdownIt.prototype.set = function (options) { |
|
|
* Batch load of all options and compenent settings. This is internal method, |
|
|
* Batch load of all options and compenent settings. This is internal method, |
|
|
* and you probably will not need it. But if you with - see available presets |
|
|
* and you probably will not need it. But if you with - see available presets |
|
|
* and data structure [here](https://github.com/markdown-it/markdown-it/tree/master/lib/presets)
|
|
|
* and data structure [here](https://github.com/markdown-it/markdown-it/tree/master/lib/presets)
|
|
|
|
|
|
* |
|
|
|
|
|
* We strongly recommend to use presets instead of direct config loads. That |
|
|
|
|
|
* will give better compatibility with next versions. |
|
|
**/ |
|
|
**/ |
|
|
MarkdownIt.prototype.configure = function (presets) { |
|
|
MarkdownIt.prototype.configure = function (presets) { |
|
|
var self = this; |
|
|
var self = this; |
|
|