Browse Source

changelog & apidoc update

pull/25/head
Vitaly Puzrin 10 years ago
parent
commit
0c7086f51f
  1. 22
      CHANGELOG.md
  2. 12
      lib/index.js
  3. 2
      lib/renderer.js

22
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 2.2.1 / 2014-12-29
------------------ ------------------

12
lib/index.js

@ -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;

2
lib/renderer.js

@ -213,7 +213,7 @@ function Renderer() {
* Each rule is called as independed static function with fixed signature: * Each rule is called as independed static function with fixed signature:
* *
* ```javascript * ```javascript
* function my_token_render(tokens, idx, options, env, self) { * function my_token_render(tokens, idx, options, env, renderer) {
* // ... * // ...
* return renderedHTML; * return renderedHTML;
* } * }

Loading…
Cancel
Save