diff --git a/lib/marked.esm.js b/lib/marked.esm.js index 0c5213057d..9d9d14b9c8 100644 --- a/lib/marked.esm.js +++ b/lib/marked.esm.js @@ -1,6 +1,6 @@ /** * marked - a markdown parser - * Copyright (c) 2011-2018, Christopher Jeffrey. (MIT Licensed) + * Copyright (c) 2011-2019, Christopher Jeffrey. (MIT Licensed) * https://github.com/markedjs/marked */ @@ -521,13 +521,13 @@ inline.breaks = merge$1({}, inline.gfm, { .getRegex() }); -var regexp = { +var rules = { block, inline }; const { defaults: defaults$1 } = defaults_1; -const { block: block$1 } = regexp; +const { block: block$1 } = rules; const { rtrim: rtrim$1, splitCells: splitCells$1, @@ -1126,7 +1126,7 @@ var Slugger_1 = class Slugger { }; const { defaults: defaults$3 } = defaults_1; -const { inline: inline$1 } = regexp; +const { inline: inline$1 } = rules; const { findClosingBracket: findClosingBracket$1, escape: escape$3 @@ -1480,22 +1480,22 @@ var Parser_1 = class Parser { /** * Static Parse Method */ - static parse(src, options) { + static parse(tokens, options) { const parser = new Parser(options); - return parser.parse(src); + return parser.parse(tokens); }; /** * Parse Loop */ - parse(src) { - this.inline = new InlineLexer_1(src.links, this.options); + parse(tokens) { + this.inline = new InlineLexer_1(tokens.links, this.options); // use an InlineLexer with a TextRenderer to extract pure text this.inlineText = new InlineLexer_1( - src.links, + tokens.links, merge$2({}, this.options, { renderer: new TextRenderer_1() }) ); - this.tokens = src.reverse(); + this.tokens = tokens.reverse(); let out = ''; while (this.next()) { diff --git a/lib/marked.js b/lib/marked.js index 8ccb660932..2181f3c9e2 100644 --- a/lib/marked.js +++ b/lib/marked.js @@ -1,6 +1,6 @@ /** * marked - a markdown parser - * Copyright (c) 2011-2018, Christopher Jeffrey. (MIT Licensed) + * Copyright (c) 2011-2019, Christopher Jeffrey. (MIT Licensed) * https://github.com/markedjs/marked */ @@ -505,13 +505,13 @@ br: edit$1(inline.br).replace('{2,}', '*').getRegex(), text: edit$1(inline.gfm.text).replace('\\b_', '\\b_| {2,}\\n').replace(/\{2,\}/g, '*').getRegex() }); - var regexp = { + var rules = { block: block, inline: inline }; var defaults$1 = defaults_1.defaults; - var block$1 = regexp.block; + var block$1 = rules.block; var rtrim$1 = helpers.rtrim, splitCells$1 = helpers.splitCells, escape$1 = helpers.escape; @@ -1100,7 +1100,7 @@ }(); var defaults$3 = defaults_1.defaults; - var inline$1 = regexp.inline; + var inline$1 = rules.inline; var findClosingBracket$1 = helpers.findClosingBracket, escape$3 = helpers.escape; /** @@ -1501,13 +1501,13 @@ /** * Parse Loop */ - value: function parse(src) { - this.inline = new InlineLexer_1(src.links, this.options); // use an InlineLexer with a TextRenderer to extract pure text + value: function parse(tokens) { + this.inline = new InlineLexer_1(tokens.links, this.options); // use an InlineLexer with a TextRenderer to extract pure text - this.inlineText = new InlineLexer_1(src.links, merge$2({}, this.options, { + this.inlineText = new InlineLexer_1(tokens.links, merge$2({}, this.options, { renderer: new TextRenderer_1() })); - this.tokens = src.reverse(); + this.tokens = tokens.reverse(); var out = ''; while (this.next()) { @@ -1700,9 +1700,9 @@ } }], [{ key: "parse", - value: function parse(src, options) { + value: function parse(tokens, options) { var parser = new Parser(options); - return parser.parse(src); + return parser.parse(tokens); } }]);