diff --git a/docs/architecture.md b/docs/architecture.md index 3f16a35..c994783 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -123,10 +123,10 @@ For example, let's replace images with vimeo links to player's iframe: ```js var md = require('markdown-it')(); -var defaultRender = md.renderer.image, +var defaultRender = md.renderer.rules.image, vimeoRE = /^https?:\/\/(www\.)?vimeo.com\/(\d+)($|\/)/; -md.renderer.image = function (tokens, idx, options, env, self) { +md.renderer.rules.image = function (tokens, idx, options, env, self) { var id; if (vimeoRE.test(tokens[idx].href)) { diff --git a/lib/parser_block.js b/lib/parser_block.js index 8a641b6..8eb2c79 100644 --- a/lib/parser_block.js +++ b/lib/parser_block.js @@ -99,7 +99,7 @@ var SPACES_RE = /\u00a0/g; var NULL_RE = /\u0000/g; /** - * ParserBlock.parse(str, options, env, outTokens) + * ParserBlock.parse(str, md, env, outTokens) * * Process input string and push block tokens into `outTokens` **/ diff --git a/lib/parser_inline.js b/lib/parser_inline.js index 8664f06..81ebcdc 100644 --- a/lib/parser_inline.js +++ b/lib/parser_inline.js @@ -141,7 +141,7 @@ ParserInline.prototype.tokenize = function (state) { /** - * ParserInline.parse(str, options, env, outTokens) + * ParserInline.parse(str, md, env, outTokens) * * Process input string and push inline tokens into `outTokens` **/