From 0c7086f51f17cab6e3c5300e2d22c77b59ba2a97 Mon Sep 17 00:00:00 2001 From: Vitaly Puzrin Date: Sun, 4 Jan 2015 15:48:21 +0300 Subject: [PATCH] changelog & apidoc update --- CHANGELOG.md | 22 ++++++++++++++++++++++ lib/index.js | 12 +++++++----- lib/renderer.js | 2 +- 3 files changed, 30 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d6d5c2..d046643 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,25 @@ +3.0.0 / 2015-01-04 +------------------ + +- Big split. All "rare" rules moved to external plugins (deflist, abbr, footnote, + sub, sup, ins, mark). +- Updated CM spec conformance to v0.15 (better unicode support). +- Added `md` (parser instance) link to all state objects (instead of former + options/parser). +- References/Footnotes/Abbrs moved to `block` chain. +- Input normalisation moved to `core` chain. +- Splitted links and images to separate rules. +- Renamed some rules. +- Removed `full` preset. Not needed anymore. +- enable/disable methods now throw by default on invalid rules (exceptions can + be disabled). +- Fixed inline html comments & cdata parse. +- Replace NULL characters with 0xFFFD instead of strip. +- Removed custom fences sugar (overcomplication). +- Rewritten link components parse helpers. +- More functions in `md.utils`. + + 2.2.1 / 2014-12-29 ------------------ diff --git a/lib/index.js b/lib/index.js index 692841b..712b07d 100644 --- a/lib/index.js +++ b/lib/index.js @@ -50,7 +50,7 @@ var config = { /** * new MarkdownIt([presetName, options]) - * - presetName (String): optional, `commonmark` / `full` / `zero` + * - presetName (String): optional, `commonmark` / `zero` * - options (Object) * * 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) - * 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) - - * 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) - * all rules disabled. Useful to quickly setup your config via `.enable()`. * For example, when you need only `bold` and `italic` markup and nothing else. @@ -102,7 +101,7 @@ var config = { * var md = require('markdown-it')(); * * // enable everything - * var md = require('markdown-it')('full', { + * var md = require('markdown-it')({ * html: true, * linkify: true, * typographer: true @@ -250,6 +249,9 @@ MarkdownIt.prototype.set = function (options) { * 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 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) { var self = this; diff --git a/lib/renderer.js b/lib/renderer.js index 4b5483b..65e5945 100644 --- a/lib/renderer.js +++ b/lib/renderer.js @@ -213,7 +213,7 @@ function Renderer() { * Each rule is called as independed static function with fixed signature: * * ```javascript - * function my_token_render(tokens, idx, options, env, self) { + * function my_token_render(tokens, idx, options, env, renderer) { * // ... * return renderedHTML; * }