From 1c6f8f8a362ec745d6dcd7f6dd9d6106b0c7491b Mon Sep 17 00:00:00 2001
From: Gerhard Schlager
```\nhello\n```
",
+ "```\nhello\n```\n
",
"only detect ``` at the beginning of lines"
);
@@ -925,13 +925,13 @@ eviltrout
assert.cooked(
" test", - "
<pre>test</pre>
",
+ "<pre>test</pre>\n
",
"it does not parse other block types in markdown code blocks"
);
assert.cooked(
" [quote]test[/quote]",
- "[quote]test[/quote]
",
+ "[quote]test[/quote]\n
",
"it does not parse other block types in markdown code blocks"
);
diff --git a/app/assets/javascripts/pretty-text/addon/engines/discourse-markdown-it.js b/app/assets/javascripts/pretty-text/addon/engines/discourse-markdown-it.js
index 80381858cd2..cf33e248cef 100644
--- a/app/assets/javascripts/pretty-text/addon/engines/discourse-markdown-it.js
+++ b/app/assets/javascripts/pretty-text/addon/engines/discourse-markdown-it.js
@@ -344,9 +344,9 @@ function buildCustomMarkdownCookFunction(engineOpts, defaultEngineOpts) {
function createMarkdownItEngineWithOpts(markdownitOpts, ruleOverrides) {
if (ruleOverrides !== undefined) {
// Preset for "zero", https://github.com/markdown-it/markdown-it/blob/master/lib/presets/zero.js
- return window.markdownit("zero", markdownitOpts).enable(ruleOverrides);
+ return globalThis.markdownit("zero", markdownitOpts).enable(ruleOverrides);
}
- return window.markdownit(markdownitOpts);
+ return globalThis.markdownit(markdownitOpts);
}
function overrideMarkdownFeatures(features, featureOverrides) {
diff --git a/app/assets/javascripts/pretty-text/engines/discourse-markdown/bbcode-inline.js b/app/assets/javascripts/pretty-text/engines/discourse-markdown/bbcode-inline.js
index 26dd393b1f4..8e8bbeba31e 100644
--- a/app/assets/javascripts/pretty-text/engines/discourse-markdown/bbcode-inline.js
+++ b/app/assets/javascripts/pretty-text/engines/discourse-markdown/bbcode-inline.js
@@ -85,7 +85,6 @@ function processBBCode(state, silent) {
let i,
startDelim,
endDelim,
- token,
tagInfo,
delimiters = state.delimiters,
max = delimiters.length;
@@ -108,9 +107,11 @@ function processBBCode(state, silent) {
endDelim = delimiters[startDelim.end];
- token = state.tokens[startDelim.token];
let tag, className;
+ const startToken = state.tokens[startDelim.token];
+ const endToken = state.tokens[endDelim.token];
+
if (typeof tagInfo.rule.wrap === "function") {
let content = "";
for (let j = startDelim.token + 1; j < endDelim.token; j++) {
@@ -119,7 +120,7 @@ function processBBCode(state, silent) {
content += inner.content;
}
}
- tagInfo.rule.wrap(token, state.tokens[endDelim.token], tagInfo, content);
+ tagInfo.rule.wrap(startToken, endToken, tagInfo, content, state);
continue;
} else {
let split = tagInfo.rule.wrap.split(".");
@@ -127,21 +128,20 @@ function processBBCode(state, silent) {
className = split.slice(1).join(" ");
}
- token.type = "bbcode_" + tagInfo.tag + "_open";
- token.tag = tag;
+ startToken.type = "bbcode_" + tagInfo.tag + "_open";
+ startToken.tag = tag;
if (className) {
- token.attrs = [["class", className]];
+ startToken.attrs = [["class", className]];
}
- token.nesting = 1;
- token.markup = token.content;
- token.content = "";
+ startToken.nesting = 1;
+ startToken.markup = startToken.content;
+ startToken.content = "";
- token = state.tokens[endDelim.token];
- token.type = "bbcode_" + tagInfo.tag + "_close";
- token.tag = tag;
- token.nesting = -1;
- token.markup = token.content;
- token.content = "";
+ endToken.type = "bbcode_" + tagInfo.tag + "_close";
+ endToken.tag = tag;
+ endToken.nesting = -1;
+ endToken.markup = startToken.content;
+ endToken.content = "";
}
return false;
}
@@ -164,7 +164,7 @@ export function setup(helper) {
md.inline.ruler.push("bbcode-inline", (state, silent) =>
tokenizeBBCode(state, silent, ruler)
);
- md.inline.ruler2.before("text_collapse", "bbcode-inline", processBBCode);
+ md.inline.ruler2.before("fragments_join", "bbcode-inline", processBBCode);
ruler.push("code", {
tag: "code",
@@ -176,13 +176,35 @@ export function setup(helper) {
},
});
- const simpleUrlRegex = /^http[s]?:\/\//;
+ const simpleUrlRegex = /^https?:\/\//;
ruler.push("url", {
tag: "url",
- wrap(startToken, endToken, tagInfo, content) {
+ wrap(startToken, endToken, tagInfo, content, state) {
const url = (tagInfo.attrs["_default"] || content).trim();
+ let linkifyFound = false;
- if (simpleUrlRegex.test(url)) {
+ if (state.md.options.linkify) {
+ const tokens = state.tokens;
+ const startIndex = tokens.indexOf(startToken);
+ const endIndex = tokens.indexOf(endToken);
+
+ // reuse existing tokens from linkify if they exist
+ for (let index = startIndex + 1; index < endIndex; index++) {
+ const token = tokens[index];
+
+ if (
+ token.markup === "linkify" &&
+ token.info === "auto" &&
+ token.type === "link_open"
+ ) {
+ linkifyFound = true;
+ token.attrs.push(["data-bbcode", "true"]);
+ break;
+ }
+ }
+ }
+
+ if (!linkifyFound && simpleUrlRegex.test(url)) {
startToken.type = "link_open";
startToken.tag = "a";
startToken.attrs = [
@@ -214,7 +236,7 @@ export function setup(helper) {
tag: "email",
replace(state, tagInfo, content) {
let token;
- let email = tagInfo.attrs["_default"] || content;
+ const email = tagInfo.attrs["_default"] || content;
token = state.push("link_open", "a", 1);
token.attrs = [
diff --git a/package.json b/package.json
index 3d80aaada9e..e055507870c 100644
--- a/package.json
+++ b/package.json
@@ -7,11 +7,10 @@
"license": "GPL-2.0-only",
"dependencies": {
"@discourse/itsatrap": "^2.0.10",
- "@fortawesome/fontawesome-free": "5.15.4",
"@discourse/moment-timezone-names-translations": "^1.0.0",
+ "@fortawesome/fontawesome-free": "5.15.4",
"@highlightjs/cdn-assets": "^10.7.0",
"@json-editor/json-editor": "^2.6.1",
- "tippy.js": "^6.3.7",
"@popperjs/core": "v2.10.2",
"@uppy/aws-s3": "^2.0.8",
"@uppy/aws-s3-multipart": "^2.2.1",
@@ -29,10 +28,11 @@
"handlebars": "^4.7.7",
"jquery": "3.5.1",
"magnific-popup": "1.1.0",
- "markdown-it": "10.0.0",
+ "markdown-it": "13.0.1",
"moment": "2.29.2",
"moment-timezone": "0.5.31",
"pikaday": "1.8.0",
+ "tippy.js": "^6.3.7",
"workbox-cacheable-response": "^4.3.1",
"workbox-core": "^4.3.1",
"workbox-expiration": "^4.3.1",
diff --git a/vendor/assets/javascripts/markdown-it.js b/vendor/assets/javascripts/markdown-it.js
index b2b5123dbfd..938677aea68 100644
--- a/vendor/assets/javascripts/markdown-it.js
+++ b/vendor/assets/javascripts/markdown-it.js
@@ -1,5105 +1,6516 @@
-/*! markdown-it 10.0.0 https://github.com//markdown-it/markdown-it @license MIT */(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.markdownit = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i' +
- * hljs.highlight(lang, str, true).value +
- * '
';
- * } catch (__) {}
- * }
- *
- * return '' + md.utils.escapeHtml(str) + '
';
- * }
- * });
- * ```
- *
- **/
-function MarkdownIt(presetName, options) {
- if (!(this instanceof MarkdownIt)) {
- return new MarkdownIt(presetName, options);
- }
-
- if (!options) {
- if (!utils.isString(presetName)) {
- options = presetName || {};
- presetName = 'default';
- }
- }
-
- /**
- * MarkdownIt#inline -> ParserInline
- *
- * Instance of [[ParserInline]]. You may need it to add new rules when
- * writing plugins. For simple rules control use [[MarkdownIt.disable]] and
- * [[MarkdownIt.enable]].
- **/
- this.inline = new ParserInline();
-
- /**
- * MarkdownIt#block -> ParserBlock
- *
- * Instance of [[ParserBlock]]. You may need it to add new rules when
- * writing plugins. For simple rules control use [[MarkdownIt.disable]] and
- * [[MarkdownIt.enable]].
- **/
- this.block = new ParserBlock();
-
- /**
- * MarkdownIt#core -> Core
- *
- * Instance of [[Core]] chain executor. You may need it to add new rules when
- * writing plugins. For simple rules control use [[MarkdownIt.disable]] and
- * [[MarkdownIt.enable]].
- **/
- this.core = new ParserCore();
-
- /**
- * MarkdownIt#renderer -> Renderer
- *
- * Instance of [[Renderer]]. Use it to modify output look. Or to add rendering
- * rules for new token types, generated by plugins.
- *
- * ##### Example
- *
- * ```javascript
- * var md = require('markdown-it')();
- *
- * function myToken(tokens, idx, options, env, self) {
- * //...
- * return result;
- * };
- *
- * md.renderer.rules['my_token'] = myToken
- * ```
- *
- * See [[Renderer]] docs and [source code](https://github.com/markdown-it/markdown-it/blob/master/lib/renderer.js).
- **/
- this.renderer = new Renderer();
-
- /**
- * MarkdownIt#linkify -> LinkifyIt
- *
- * [linkify-it](https://github.com/markdown-it/linkify-it) instance.
- * Used by [linkify](https://github.com/markdown-it/markdown-it/blob/master/lib/rules_core/linkify.js)
- * rule.
- **/
- this.linkify = new LinkifyIt();
-
- /**
- * MarkdownIt#validateLink(url) -> Boolean
- *
- * Link validation function. CommonMark allows too much in links. By default
- * we disable `javascript:`, `vbscript:`, `file:` schemas, and almost all `data:...` schemas
- * except some embedded image types.
- *
- * You can change this behaviour:
- *
- * ```javascript
- * var md = require('markdown-it')();
- * // enable everything
- * md.validateLink = function () { return true; }
- * ```
- **/
- this.validateLink = validateLink;
-
- /**
- * MarkdownIt#normalizeLink(url) -> String
- *
- * Function used to encode link url to a machine-readable format,
- * which includes url-encoding, punycode, etc.
- **/
- this.normalizeLink = normalizeLink;
-
- /**
- * MarkdownIt#normalizeLinkText(url) -> String
- *
- * Function used to decode link url to a human-readable format`
- **/
- this.normalizeLinkText = normalizeLinkText;
-
-
- // Expose utils & helpers for easy acces from plugins
-
- /**
- * MarkdownIt#utils -> utils
- *
- * Assorted utility functions, useful to write plugins. See details
- * [here](https://github.com/markdown-it/markdown-it/blob/master/lib/common/utils.js).
- **/
- this.utils = utils;
-
- /**
- * MarkdownIt#helpers -> helpers
- *
- * Link components parser functions, useful to write plugins. See details
- * [here](https://github.com/markdown-it/markdown-it/blob/master/lib/helpers).
- **/
- this.helpers = utils.assign({}, helpers);
-
-
- this.options = {};
- this.configure(presetName);
-
- if (options) { this.set(options); }
-}
-
-
-/** chainable
- * MarkdownIt.set(options)
- *
- * Set parser options (in the same format as in constructor). Probably, you
- * will never need it, but you can change options after constructor call.
- *
- * ##### Example
- *
- * ```javascript
- * var md = require('markdown-it')()
- * .set({ html: true, breaks: true })
- * .set({ typographer, true });
- * ```
- *
- * __Note:__ To achieve the best possible performance, don't modify a
- * `markdown-it` instance options on the fly. If you need multiple configurations
- * it's best to create multiple instances and initialize each with separate
- * config.
- **/
-MarkdownIt.prototype.set = function (options) {
- utils.assign(this.options, options);
- return this;
-};
-
-
-/** chainable, internal
- * MarkdownIt.configure(presets)
- *
- * 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, presetName;
-
- if (utils.isString(presets)) {
- presetName = presets;
- presets = config[presetName];
- if (!presets) { throw new Error('Wrong `markdown-it` preset "' + presetName + '", check name'); }
- }
-
- if (!presets) { throw new Error('Wrong `markdown-it` preset, can\'t be empty'); }
-
- if (presets.options) { self.set(presets.options); }
-
- if (presets.components) {
- Object.keys(presets.components).forEach(function (name) {
- if (presets.components[name].rules) {
- self[name].ruler.enableOnly(presets.components[name].rules);
- }
- if (presets.components[name].rules2) {
- self[name].ruler2.enableOnly(presets.components[name].rules2);
- }
- });
- }
- return this;
-};
-
-
-/** chainable
- * MarkdownIt.enable(list, ignoreInvalid)
- * - list (String|Array): rule name or list of rule names to enable
- * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.
- *
- * Enable list or rules. It will automatically find appropriate components,
- * containing rules with given names. If rule not found, and `ignoreInvalid`
- * not set - throws exception.
- *
- * ##### Example
- *
- * ```javascript
- * var md = require('markdown-it')()
- * .enable(['sub', 'sup'])
- * .disable('smartquotes');
- * ```
- **/
-MarkdownIt.prototype.enable = function (list, ignoreInvalid) {
- var result = [];
-
- if (!Array.isArray(list)) { list = [ list ]; }
-
- [ 'core', 'block', 'inline' ].forEach(function (chain) {
- result = result.concat(this[chain].ruler.enable(list, true));
- }, this);
-
- result = result.concat(this.inline.ruler2.enable(list, true));
-
- var missed = list.filter(function (name) { return result.indexOf(name) < 0; });
-
- if (missed.length && !ignoreInvalid) {
- throw new Error('MarkdownIt. Failed to enable unknown rule(s): ' + missed);
- }
-
- return this;
-};
-
-
-/** chainable
- * MarkdownIt.disable(list, ignoreInvalid)
- * - list (String|Array): rule name or list of rule names to disable.
- * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.
- *
- * The same as [[MarkdownIt.enable]], but turn specified rules off.
- **/
-MarkdownIt.prototype.disable = function (list, ignoreInvalid) {
- var result = [];
-
- if (!Array.isArray(list)) { list = [ list ]; }
-
- [ 'core', 'block', 'inline' ].forEach(function (chain) {
- result = result.concat(this[chain].ruler.disable(list, true));
- }, this);
-
- result = result.concat(this.inline.ruler2.disable(list, true));
-
- var missed = list.filter(function (name) { return result.indexOf(name) < 0; });
-
- if (missed.length && !ignoreInvalid) {
- throw new Error('MarkdownIt. Failed to disable unknown rule(s): ' + missed);
- }
- return this;
-};
-
-
-/** chainable
- * MarkdownIt.use(plugin, params)
- *
- * Load specified plugin with given params into current parser instance.
- * It's just a sugar to call `plugin(md, params)` with curring.
- *
- * ##### Example
- *
- * ```javascript
- * var iterator = require('markdown-it-for-inline');
- * var md = require('markdown-it')()
- * .use(iterator, 'foo_replace', 'text', function (tokens, idx) {
- * tokens[idx].content = tokens[idx].content.replace(/foo/g, 'bar');
- * });
- * ```
- **/
-MarkdownIt.prototype.use = function (plugin /*, params, ... */) {
- var args = [ this ].concat(Array.prototype.slice.call(arguments, 1));
- plugin.apply(plugin, args);
- return this;
-};
-
-
-/** internal
- * MarkdownIt.parse(src, env) -> Array
- * - src (String): source string
- * - env (Object): environment sandbox
- *
- * Parse input string and returns list of block tokens (special token type
- * "inline" will contain list of inline tokens). You should not call this
- * method directly, until you write custom renderer (for example, to produce
- * AST).
- *
- * `env` is used to pass data between "distributed" rules and return additional
- * metadata like reference info, needed for the renderer. It also can be used to
- * inject data in specific cases. Usually, you will be ok to pass `{}`,
- * and then pass updated object to renderer.
- **/
-MarkdownIt.prototype.parse = function (src, env) {
- if (typeof src !== 'string') {
- throw new Error('Input data should be a String');
- }
-
- var state = new this.core.State(src, this, env);
-
- this.core.process(state);
-
- return state.tokens;
-};
-
-
-/**
- * MarkdownIt.render(src [, env]) -> String
- * - src (String): source string
- * - env (Object): environment sandbox
- *
- * Render markdown string into html. It does all magic for you :).
- *
- * `env` can be used to inject additional metadata (`{}` by default).
- * But you will not need it with high probability. See also comment
- * in [[MarkdownIt.parse]].
- **/
-MarkdownIt.prototype.render = function (src, env) {
- env = env || {};
-
- return this.renderer.render(this.parse(src, env), this.options, env);
-};
-
-
-/** internal
- * MarkdownIt.parseInline(src, env) -> Array
- * - src (String): source string
- * - env (Object): environment sandbox
- *
- * The same as [[MarkdownIt.parse]] but skip all block rules. It returns the
- * block tokens list with the single `inline` element, containing parsed inline
- * tokens in `children` property. Also updates `env` object.
- **/
-MarkdownIt.prototype.parseInline = function (src, env) {
- var state = new this.core.State(src, this, env);
-
- state.inlineMode = true;
- this.core.process(state);
-
- return state.tokens;
-};
-
-
-/**
- * MarkdownIt.renderInline(src [, env]) -> String
- * - src (String): source string
- * - env (Object): environment sandbox
- *
- * Similar to [[MarkdownIt.render]] but for single paragraph content. Result
- * will NOT be wrapped into `` tags.
- **/
-MarkdownIt.prototype.renderInline = function (src, env) {
- env = env || {};
-
- return this.renderer.render(this.parseInline(src, env), this.options, env);
-};
-
-
-module.exports = MarkdownIt;
-
-},{"./common/utils":4,"./helpers":5,"./parser_block":10,"./parser_core":11,"./parser_inline":12,"./presets/commonmark":13,"./presets/default":14,"./presets/zero":15,"./renderer":16,"linkify-it":53,"mdurl":58,"punycode":60}],10:[function(require,module,exports){
-/** internal
- * class ParserBlock
- *
- * Block-level tokenizer.
- **/
-'use strict';
-
-
-var Ruler = require('./ruler');
-
-
-var _rules = [
- // First 2 params - rule name & source. Secondary array - list of rules,
- // which can be terminated by this one.
- [ 'table', require('./rules_block/table'), [ 'paragraph', 'reference' ] ],
- [ 'code', require('./rules_block/code') ],
- [ 'fence', require('./rules_block/fence'), [ 'paragraph', 'reference', 'blockquote', 'list' ] ],
- [ 'blockquote', require('./rules_block/blockquote'), [ 'paragraph', 'reference', 'blockquote', 'list' ] ],
- [ 'hr', require('./rules_block/hr'), [ 'paragraph', 'reference', 'blockquote', 'list' ] ],
- [ 'list', require('./rules_block/list'), [ 'paragraph', 'reference', 'blockquote' ] ],
- [ 'reference', require('./rules_block/reference') ],
- [ 'heading', require('./rules_block/heading'), [ 'paragraph', 'reference', 'blockquote' ] ],
- [ 'lheading', require('./rules_block/lheading') ],
- [ 'html_block', require('./rules_block/html_block'), [ 'paragraph', 'reference', 'blockquote' ] ],
- [ 'paragraph', require('./rules_block/paragraph') ]
-];
-
-
-/**
- * new ParserBlock()
- **/
-function ParserBlock() {
- /**
- * ParserBlock#ruler -> Ruler
- *
- * [[Ruler]] instance. Keep configuration of block rules.
- **/
- this.ruler = new Ruler();
-
- for (var i = 0; i < _rules.length; i++) {
- this.ruler.push(_rules[i][0], _rules[i][1], { alt: (_rules[i][2] || []).slice() });
- }
-}
-
-
-// Generate tokens for input range
-//
-ParserBlock.prototype.tokenize = function (state, startLine, endLine) {
- var ok, i,
- rules = this.ruler.getRules(''),
- len = rules.length,
- line = startLine,
- hasEmptyLines = false,
- maxNesting = state.md.options.maxNesting;
-
- while (line < endLine) {
- state.line = line = state.skipEmptyLines(line);
- if (line >= endLine) { break; }
-
- // Termination condition for nested calls.
- // Nested calls currently used for blockquotes & lists
- if (state.sCount[line] < state.blkIndent) { break; }
-
- // If nesting level exceeded - skip tail to the end. That's not ordinary
- // situation and we should not care about content.
- if (state.level >= maxNesting) {
- state.line = endLine;
- break;
- }
-
- // Try all possible rules.
- // On success, rule should:
- //
- // - update `state.line`
- // - update `state.tokens`
- // - return true
-
- for (i = 0; i < len; i++) {
- ok = rules[i](state, line, endLine, false);
- if (ok) { break; }
- }
-
- // set state.tight if we had an empty line before current tag
- // i.e. latest empty line should not count
- state.tight = !hasEmptyLines;
-
- // paragraph might "eat" one newline after it in nested lists
- if (state.isEmpty(state.line - 1)) {
- hasEmptyLines = true;
- }
-
- line = state.line;
-
- if (line < endLine && state.isEmpty(line)) {
- hasEmptyLines = true;
- line++;
- state.line = line;
- }
- }
-};
-
-
-/**
- * ParserBlock.parse(str, md, env, outTokens)
- *
- * Process input string and push block tokens into `outTokens`
- **/
-ParserBlock.prototype.parse = function (src, md, env, outTokens) {
- var state;
-
- if (!src) { return; }
-
- state = new this.State(src, md, env, outTokens);
-
- this.tokenize(state, state.line, state.lineMax);
-};
-
-
-ParserBlock.prototype.State = require('./rules_block/state_block');
-
-
-module.exports = ParserBlock;
-
-},{"./ruler":17,"./rules_block/blockquote":18,"./rules_block/code":19,"./rules_block/fence":20,"./rules_block/heading":21,"./rules_block/hr":22,"./rules_block/html_block":23,"./rules_block/lheading":24,"./rules_block/list":25,"./rules_block/paragraph":26,"./rules_block/reference":27,"./rules_block/state_block":28,"./rules_block/table":29}],11:[function(require,module,exports){
-/** internal
- * class Core
- *
- * Top-level rules executor. Glues block/inline parsers and does intermediate
- * transformations.
- **/
-'use strict';
-
-
-var Ruler = require('./ruler');
-
-
-var _rules = [
- [ 'normalize', require('./rules_core/normalize') ],
- [ 'block', require('./rules_core/block') ],
- [ 'inline', require('./rules_core/inline') ],
- [ 'linkify', require('./rules_core/linkify') ],
- [ 'replacements', require('./rules_core/replacements') ],
- [ 'smartquotes', require('./rules_core/smartquotes') ]
-];
-
-
-/**
- * new Core()
- **/
-function Core() {
- /**
- * Core#ruler -> Ruler
- *
- * [[Ruler]] instance. Keep configuration of core rules.
- **/
- this.ruler = new Ruler();
-
- for (var i = 0; i < _rules.length; i++) {
- this.ruler.push(_rules[i][0], _rules[i][1]);
- }
-}
-
-
-/**
- * Core.process(state)
- *
- * Executes core chain rules.
- **/
-Core.prototype.process = function (state) {
- var i, l, rules;
-
- rules = this.ruler.getRules('');
-
- for (i = 0, l = rules.length; i < l; i++) {
- rules[i](state);
- }
-};
-
-Core.prototype.State = require('./rules_core/state_core');
-
-
-module.exports = Core;
-
-},{"./ruler":17,"./rules_core/block":30,"./rules_core/inline":31,"./rules_core/linkify":32,"./rules_core/normalize":33,"./rules_core/replacements":34,"./rules_core/smartquotes":35,"./rules_core/state_core":36}],12:[function(require,module,exports){
-/** internal
- * class ParserInline
- *
- * Tokenizes paragraph content.
- **/
-'use strict';
-
-
-var Ruler = require('./ruler');
-
-
-////////////////////////////////////////////////////////////////////////////////
-// Parser rules
-
-var _rules = [
- [ 'text', require('./rules_inline/text') ],
- [ 'newline', require('./rules_inline/newline') ],
- [ 'escape', require('./rules_inline/escape') ],
- [ 'backticks', require('./rules_inline/backticks') ],
- [ 'strikethrough', require('./rules_inline/strikethrough').tokenize ],
- [ 'emphasis', require('./rules_inline/emphasis').tokenize ],
- [ 'link', require('./rules_inline/link') ],
- [ 'image', require('./rules_inline/image') ],
- [ 'autolink', require('./rules_inline/autolink') ],
- [ 'html_inline', require('./rules_inline/html_inline') ],
- [ 'entity', require('./rules_inline/entity') ]
-];
-
-var _rules2 = [
- [ 'balance_pairs', require('./rules_inline/balance_pairs') ],
- [ 'strikethrough', require('./rules_inline/strikethrough').postProcess ],
- [ 'emphasis', require('./rules_inline/emphasis').postProcess ],
- [ 'text_collapse', require('./rules_inline/text_collapse') ]
-];
-
-
-/**
- * new ParserInline()
- **/
-function ParserInline() {
- var i;
-
- /**
- * ParserInline#ruler -> Ruler
- *
- * [[Ruler]] instance. Keep configuration of inline rules.
- **/
- this.ruler = new Ruler();
-
- for (i = 0; i < _rules.length; i++) {
- this.ruler.push(_rules[i][0], _rules[i][1]);
- }
-
- /**
- * ParserInline#ruler2 -> Ruler
- *
- * [[Ruler]] instance. Second ruler used for post-processing
- * (e.g. in emphasis-like rules).
- **/
- this.ruler2 = new Ruler();
-
- for (i = 0; i < _rules2.length; i++) {
- this.ruler2.push(_rules2[i][0], _rules2[i][1]);
- }
-}
-
-
-// Skip single token by running all rules in validation mode;
-// returns `true` if any rule reported success
-//
-ParserInline.prototype.skipToken = function (state) {
- var ok, i, pos = state.pos,
- rules = this.ruler.getRules(''),
- len = rules.length,
- maxNesting = state.md.options.maxNesting,
- cache = state.cache;
-
-
- if (typeof cache[pos] !== 'undefined') {
- state.pos = cache[pos];
- return;
- }
-
- if (state.level < maxNesting) {
- for (i = 0; i < len; i++) {
- // Increment state.level and decrement it later to limit recursion.
- // It's harmless to do here, because no tokens are created. But ideally,
- // we'd need a separate private state variable for this purpose.
- //
- state.level++;
- ok = rules[i](state, true);
- state.level--;
-
- if (ok) { break; }
- }
- } else {
- // Too much nesting, just skip until the end of the paragraph.
- //
- // NOTE: this will cause links to behave incorrectly in the following case,
- // when an amount of `[` is exactly equal to `maxNesting + 1`:
- //
- // [[[[[[[[[[[[[[[[[[[[[foo]()
- //
- // TODO: remove this workaround when CM standard will allow nested links
- // (we can replace it by preventing links from being parsed in
- // validation mode)
- //
- state.pos = state.posMax;
- }
-
- if (!ok) { state.pos++; }
- cache[pos] = state.pos;
-};
-
-
-// Generate tokens for input range
-//
-ParserInline.prototype.tokenize = function (state) {
- var ok, i,
- rules = this.ruler.getRules(''),
- len = rules.length,
- end = state.posMax,
- maxNesting = state.md.options.maxNesting;
-
- while (state.pos < end) {
- // Try all possible rules.
- // On success, rule should:
- //
- // - update `state.pos`
- // - update `state.tokens`
- // - return true
-
- if (state.level < maxNesting) {
- for (i = 0; i < len; i++) {
- ok = rules[i](state, false);
- if (ok) { break; }
- }
- }
-
- if (ok) {
- if (state.pos >= end) { break; }
- continue;
- }
-
- state.pending += state.src[state.pos++];
- }
-
- if (state.pending) {
- state.pushPending();
- }
-};
-
-
-/**
- * ParserInline.parse(str, md, env, outTokens)
- *
- * Process input string and push inline tokens into `outTokens`
- **/
-ParserInline.prototype.parse = function (str, md, env, outTokens) {
- var i, rules, len;
- var state = new this.State(str, md, env, outTokens);
-
- this.tokenize(state);
-
- rules = this.ruler2.getRules('');
- len = rules.length;
-
- for (i = 0; i < len; i++) {
- rules[i](state);
- }
-};
-
-
-ParserInline.prototype.State = require('./rules_inline/state_inline');
-
-
-module.exports = ParserInline;
-
-},{"./ruler":17,"./rules_inline/autolink":37,"./rules_inline/backticks":38,"./rules_inline/balance_pairs":39,"./rules_inline/emphasis":40,"./rules_inline/entity":41,"./rules_inline/escape":42,"./rules_inline/html_inline":43,"./rules_inline/image":44,"./rules_inline/link":45,"./rules_inline/newline":46,"./rules_inline/state_inline":47,"./rules_inline/strikethrough":48,"./rules_inline/text":49,"./rules_inline/text_collapse":50}],13:[function(require,module,exports){
-// Commonmark default options
-
-'use strict';
-
-
-module.exports = {
- options: {
- html: true, // Enable HTML tags in source
- xhtmlOut: true, // Use '/' to close single tags (
)
- breaks: false, // Convert '\n' in paragraphs into
- langPrefix: 'language-', // CSS language prefix for fenced blocks
- linkify: false, // autoconvert URL-like texts to links
-
- // Enable some language-neutral replacements + quotes beautification
- typographer: false,
-
- // Double + single quotes replacement pairs, when typographer enabled,
- // and smartquotes on. Could be either a String or an Array.
- //
- // For example, you can use '«»„“' for Russian, '„“‚‘' for German,
- // and ['«\xA0', '\xA0»', '‹\xA0', '\xA0›'] for French (including nbsp).
- quotes: '\u201c\u201d\u2018\u2019', /* “”‘’ */
-
- // Highlighter function. Should return escaped HTML,
- // or '' if the source string is not changed and should be escaped externaly.
- // If result starts with
' +
- escapeHtml(tokens[idx].content) +
- '
\n';
-};
-
-
-default_rules.fence = function (tokens, idx, options, env, slf) {
- var token = tokens[idx],
- info = token.info ? unescapeAll(token.info).trim() : '',
- langName = '',
- highlighted, i, tmpAttrs, tmpToken;
-
- if (info) {
- langName = info.split(/\s+/g)[0];
- }
-
- if (options.highlight) {
- highlighted = options.highlight(token.content, langName) || escapeHtml(token.content);
- } else {
- highlighted = escapeHtml(token.content);
- }
-
- if (highlighted.indexOf(''
- + highlighted
- + '
\n';
- }
-
-
- return ''
- + highlighted
- + '
\n';
-};
-
-
-default_rules.image = function (tokens, idx, options, env, slf) {
- var token = tokens[idx];
-
- // "alt" attr MUST be set, even if empty. Because it's mandatory and
- // should be placed on proper position for tests.
- //
- // Replace content with actual value
-
- token.attrs[token.attrIndex('alt')][1] =
- slf.renderInlineAsText(token.children, options, env);
-
- return slf.renderToken(tokens, idx, options);
-};
-
-
-default_rules.hardbreak = function (tokens, idx, options /*, env */) {
- return options.xhtmlOut ? '" + escapeHtml(tokens[idx].content) + "
";
+ };
+ default_rules.code_block = function(tokens, idx, options, env, slf) {
+ var token = tokens[idx];
+ return "" + escapeHtml(tokens[idx].content) + "
\n";
+ };
+ default_rules.fence = function(tokens, idx, options, env, slf) {
+ var token = tokens[idx], info = token.info ? unescapeAll(token.info).trim() : "", langName = "", langAttrs = "", highlighted, i, arr, tmpAttrs, tmpToken;
+ if (info) {
+ arr = info.split(/(\s+)/g);
+ langName = arr[0];
+ langAttrs = arr.slice(2).join("");
+ }
+ if (options.highlight) {
+ highlighted = options.highlight(token.content, langName, langAttrs) || escapeHtml(token.content);
+ } else {
+ highlighted = escapeHtml(token.content);
+ }
+ if (highlighted.indexOf("" + highlighted + "
\n";
+ }
+ return "" + highlighted + "
\n";
+ };
+ default_rules.image = function(tokens, idx, options, env, slf) {
+ var token = tokens[idx];
+ // "alt" attr MUST be set, even if empty. Because it's mandatory and
+ // should be placed on proper position for tests.
+
+ // Replace content with actual value
+ token.attrs[token.attrIndex("alt")][1] = slf.renderInlineAsText(token.children, options, env);
+ return slf.renderToken(tokens, idx, options);
+ };
+ default_rules.hardbreak = function(tokens, idx, options /*, env */) {
+ return options.xhtmlOut ? "' +
+ * hljs.highlight(str, { language: lang, ignoreIllegals: true }).value +
+ * '
';
+ * } catch (__) {}
+ * }
+ *
+ * return '' + md.utils.escapeHtml(str) + '
';
+ * }
+ * });
+ * ```
+ *
+ **/ function MarkdownIt(presetName, options) {
+ if (!(this instanceof MarkdownIt)) {
+ return new MarkdownIt(presetName, options);
+ }
+ if (!options) {
+ if (!utils.isString(presetName)) {
+ options = presetName || {};
+ presetName = "default";
+ }
+ }
+ /**
+ * MarkdownIt#inline -> ParserInline
+ *
+ * Instance of [[ParserInline]]. You may need it to add new rules when
+ * writing plugins. For simple rules control use [[MarkdownIt.disable]] and
+ * [[MarkdownIt.enable]].
+ **/ this.inline = new parser_inline;
+ /**
+ * MarkdownIt#block -> ParserBlock
+ *
+ * Instance of [[ParserBlock]]. You may need it to add new rules when
+ * writing plugins. For simple rules control use [[MarkdownIt.disable]] and
+ * [[MarkdownIt.enable]].
+ **/ this.block = new parser_block;
+ /**
+ * MarkdownIt#core -> Core
+ *
+ * Instance of [[Core]] chain executor. You may need it to add new rules when
+ * writing plugins. For simple rules control use [[MarkdownIt.disable]] and
+ * [[MarkdownIt.enable]].
+ **/ this.core = new parser_core;
+ /**
+ * MarkdownIt#renderer -> Renderer
+ *
+ * Instance of [[Renderer]]. Use it to modify output look. Or to add rendering
+ * rules for new token types, generated by plugins.
+ *
+ * ##### Example
+ *
+ * ```javascript
+ * var md = require('markdown-it')();
+ *
+ * function myToken(tokens, idx, options, env, self) {
+ * //...
+ * return result;
+ * };
+ *
+ * md.renderer.rules['my_token'] = myToken
+ * ```
+ *
+ * See [[Renderer]] docs and [source code](https://github.com/markdown-it/markdown-it/blob/master/lib/renderer.js).
+ **/ this.renderer = new renderer;
+ /**
+ * MarkdownIt#linkify -> LinkifyIt
+ *
+ * [linkify-it](https://github.com/markdown-it/linkify-it) instance.
+ * Used by [linkify](https://github.com/markdown-it/markdown-it/blob/master/lib/rules_core/linkify.js)
+ * rule.
+ **/ this.linkify = new linkifyIt;
+ /**
+ * MarkdownIt#validateLink(url) -> Boolean
+ *
+ * Link validation function. CommonMark allows too much in links. By default
+ * we disable `javascript:`, `vbscript:`, `file:` schemas, and almost all `data:...` schemas
+ * except some embedded image types.
+ *
+ * You can change this behaviour:
+ *
+ * ```javascript
+ * var md = require('markdown-it')();
+ * // enable everything
+ * md.validateLink = function () { return true; }
+ * ```
+ **/ this.validateLink = validateLink;
+ /**
+ * MarkdownIt#normalizeLink(url) -> String
+ *
+ * Function used to encode link url to a machine-readable format,
+ * which includes url-encoding, punycode, etc.
+ **/ this.normalizeLink = normalizeLink;
+ /**
+ * MarkdownIt#normalizeLinkText(url) -> String
+ *
+ * Function used to decode link url to a human-readable format`
+ **/ this.normalizeLinkText = normalizeLinkText;
+ // Expose utils & helpers for easy acces from plugins
+ /**
+ * MarkdownIt#utils -> utils
+ *
+ * Assorted utility functions, useful to write plugins. See details
+ * [here](https://github.com/markdown-it/markdown-it/blob/master/lib/common/utils.js).
+ **/ this.utils = utils;
+ /**
+ * MarkdownIt#helpers -> helpers
+ *
+ * Link components parser functions, useful to write plugins. See details
+ * [here](https://github.com/markdown-it/markdown-it/blob/master/lib/helpers).
+ **/ this.helpers = utils.assign({}, helpers);
+ this.options = {};
+ this.configure(presetName);
+ if (options) {
+ this.set(options);
+ }
+ }
+ /** chainable
+ * MarkdownIt.set(options)
+ *
+ * Set parser options (in the same format as in constructor). Probably, you
+ * will never need it, but you can change options after constructor call.
+ *
+ * ##### Example
+ *
+ * ```javascript
+ * var md = require('markdown-it')()
+ * .set({ html: true, breaks: true })
+ * .set({ typographer, true });
+ * ```
+ *
+ * __Note:__ To achieve the best possible performance, don't modify a
+ * `markdown-it` instance options on the fly. If you need multiple configurations
+ * it's best to create multiple instances and initialize each with separate
+ * config.
+ **/ MarkdownIt.prototype.set = function(options) {
+ utils.assign(this.options, options);
+ return this;
+ };
+ /** chainable, internal
+ * MarkdownIt.configure(presets)
+ *
+ * Batch load of all options and compenent settings. This is internal method,
+ * and you probably will not need it. But if you will - 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, presetName;
+ if (utils.isString(presets)) {
+ presetName = presets;
+ presets = config[presetName];
+ if (!presets) {
+ throw new Error('Wrong `markdown-it` preset "' + presetName + '", check name');
+ }
+ }
+ if (!presets) {
+ throw new Error("Wrong `markdown-it` preset, can't be empty");
+ }
+ if (presets.options) {
+ self.set(presets.options);
+ }
+ if (presets.components) {
+ Object.keys(presets.components).forEach((function(name) {
+ if (presets.components[name].rules) {
+ self[name].ruler.enableOnly(presets.components[name].rules);
+ }
+ if (presets.components[name].rules2) {
+ self[name].ruler2.enableOnly(presets.components[name].rules2);
+ }
+ }));
+ }
+ return this;
+ };
+ /** chainable
+ * MarkdownIt.enable(list, ignoreInvalid)
+ * - list (String|Array): rule name or list of rule names to enable
+ * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.
+ *
+ * Enable list or rules. It will automatically find appropriate components,
+ * containing rules with given names. If rule not found, and `ignoreInvalid`
+ * not set - throws exception.
+ *
+ * ##### Example
+ *
+ * ```javascript
+ * var md = require('markdown-it')()
+ * .enable(['sub', 'sup'])
+ * .disable('smartquotes');
+ * ```
+ **/ MarkdownIt.prototype.enable = function(list, ignoreInvalid) {
+ var result = [];
+ if (!Array.isArray(list)) {
+ list = [ list ];
+ }
+ [ "core", "block", "inline" ].forEach((function(chain) {
+ result = result.concat(this[chain].ruler.enable(list, true));
+ }), this);
+ result = result.concat(this.inline.ruler2.enable(list, true));
+ var missed = list.filter((function(name) {
+ return result.indexOf(name) < 0;
+ }));
+ if (missed.length && !ignoreInvalid) {
+ throw new Error("MarkdownIt. Failed to enable unknown rule(s): " + missed);
+ }
+ return this;
+ };
+ /** chainable
+ * MarkdownIt.disable(list, ignoreInvalid)
+ * - list (String|Array): rule name or list of rule names to disable.
+ * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.
+ *
+ * The same as [[MarkdownIt.enable]], but turn specified rules off.
+ **/ MarkdownIt.prototype.disable = function(list, ignoreInvalid) {
+ var result = [];
+ if (!Array.isArray(list)) {
+ list = [ list ];
+ }
+ [ "core", "block", "inline" ].forEach((function(chain) {
+ result = result.concat(this[chain].ruler.disable(list, true));
+ }), this);
+ result = result.concat(this.inline.ruler2.disable(list, true));
+ var missed = list.filter((function(name) {
+ return result.indexOf(name) < 0;
+ }));
+ if (missed.length && !ignoreInvalid) {
+ throw new Error("MarkdownIt. Failed to disable unknown rule(s): " + missed);
+ }
+ return this;
+ };
+ /** chainable
+ * MarkdownIt.use(plugin, params)
+ *
+ * Load specified plugin with given params into current parser instance.
+ * It's just a sugar to call `plugin(md, params)` with curring.
+ *
+ * ##### Example
+ *
+ * ```javascript
+ * var iterator = require('markdown-it-for-inline');
+ * var md = require('markdown-it')()
+ * .use(iterator, 'foo_replace', 'text', function (tokens, idx) {
+ * tokens[idx].content = tokens[idx].content.replace(/foo/g, 'bar');
+ * });
+ * ```
+ **/ MarkdownIt.prototype.use = function(plugin /*, params, ... */) {
+ var args = [ this ].concat(Array.prototype.slice.call(arguments, 1));
+ plugin.apply(plugin, args);
+ return this;
+ };
+ /** internal
+ * MarkdownIt.parse(src, env) -> Array
+ * - src (String): source string
+ * - env (Object): environment sandbox
+ *
+ * Parse input string and return list of block tokens (special token type
+ * "inline" will contain list of inline tokens). You should not call this
+ * method directly, until you write custom renderer (for example, to produce
+ * AST).
+ *
+ * `env` is used to pass data between "distributed" rules and return additional
+ * metadata like reference info, needed for the renderer. It also can be used to
+ * inject data in specific cases. Usually, you will be ok to pass `{}`,
+ * and then pass updated object to renderer.
+ **/ MarkdownIt.prototype.parse = function(src, env) {
+ if (typeof src !== "string") {
+ throw new Error("Input data should be a String");
+ }
+ var state = new this.core.State(src, this, env);
+ this.core.process(state);
+ return state.tokens;
+ };
+ /**
+ * MarkdownIt.render(src [, env]) -> String
+ * - src (String): source string
+ * - env (Object): environment sandbox
+ *
+ * Render markdown string into html. It does all magic for you :).
+ *
+ * `env` can be used to inject additional metadata (`{}` by default).
+ * But you will not need it with high probability. See also comment
+ * in [[MarkdownIt.parse]].
+ **/ MarkdownIt.prototype.render = function(src, env) {
+ env = env || {};
+ return this.renderer.render(this.parse(src, env), this.options, env);
+ };
+ /** internal
+ * MarkdownIt.parseInline(src, env) -> Array
+ * - src (String): source string
+ * - env (Object): environment sandbox
+ *
+ * The same as [[MarkdownIt.parse]] but skip all block rules. It returns the
+ * block tokens list with the single `inline` element, containing parsed inline
+ * tokens in `children` property. Also updates `env` object.
+ **/ MarkdownIt.prototype.parseInline = function(src, env) {
+ var state = new this.core.State(src, this, env);
+ state.inlineMode = true;
+ this.core.process(state);
+ return state.tokens;
+ };
+ /**
+ * MarkdownIt.renderInline(src [, env]) -> String
+ * - src (String): source string
+ * - env (Object): environment sandbox
+ *
+ * Similar to [[MarkdownIt.render]] but for single paragraph content. Result
+ * will NOT be wrapped into `` tags. + **/ MarkdownIt.prototype.renderInline = function(src, env) { + env = env || {}; + return this.renderer.render(this.parseInline(src, env), this.options, env); + }; + var lib = MarkdownIt; + var markdownIt = lib; + return markdownIt; +})); diff --git a/yarn.lock b/yarn.lock index d0274ef25a8..a3413b669bd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -437,6 +437,11 @@ argparse@^1.0.7: dependencies: sprintf-js "~1.0.2" +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + arr-diff@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" @@ -1375,10 +1380,10 @@ ensure-posix-path@^1.0.0: resolved "https://registry.yarnpkg.com/ensure-posix-path/-/ensure-posix-path-1.1.1.tgz#3c62bdb19fa4681544289edb2b382adc029179ce" integrity sha512-VWU0/zXzVbeJNXvME/5EmLuEj2TauvoaTz6aFYK1Z92JCBlDlZ3Gu0tuGR42kpW1754ywTs+QB0g5TP0oj9Zaw== -entities@~2.0.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/entities/-/entities-2.0.3.tgz#5c487e5742ab93c15abb5da22759b8590ec03b7f" - integrity sha512-MyoZ0jgnLvB2X3Lg5HqpFmn1kybDiIfEQmKzTb5apr51Rb+T3KdmMiqa70T+bhGnyv7bQ6WMj2QMHpGMmlrUYQ== +entities@~3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/entities/-/entities-3.0.1.tgz#2b887ca62585e96db3903482d336c1006c3001d4" + integrity sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q== es-abstract@^1.18.0-next.1, es-abstract@^1.18.0-next.2: version "1.18.3" @@ -2585,10 +2590,10 @@ lighthouse-logger@^1.0.0: debug "^2.6.8" marky "^1.2.0" -linkify-it@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-2.2.0.tgz#e3b54697e78bf915c70a38acd78fd09e0058b1cf" - integrity sha512-GnAl/knGn+i1U/wjBz3akz2stz+HrHLsxMwHQGofCDfPvlf+gDKN58UtfmUquTY4/MXeE2x7k19KQmeoZi94Iw== +linkify-it@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-4.0.1.tgz#01f1d5e508190d06669982ba31a7d9f56a5751ec" + integrity sha512-C7bfi1UZmoj8+PQx22XyeXCuBlokoyWQL5pWSP+EI6nzRylyThouddufc2c1NDIcP9k5agmN9fLpA7VNJfIiqw== dependencies: uc.micro "^1.0.1" @@ -2669,14 +2674,14 @@ map-visit@^1.0.0: dependencies: object-visit "^1.0.0" -markdown-it@10.0.0: - version "10.0.0" - resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-10.0.0.tgz#abfc64f141b1722d663402044e43927f1f50a8dc" - integrity sha512-YWOP1j7UbDNz+TumYP1kpwnP0aEa711cJjrAQrzd0UXlbJfc5aAq0F/PZHjiioqDC1NKgvIMX+o+9Bk7yuM2dg== +markdown-it@13.0.1: + version "13.0.1" + resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-13.0.1.tgz#c6ecc431cacf1a5da531423fc6a42807814af430" + integrity sha512-lTlxriVoy2criHP0JKRhO2VDG9c2ypWCsT237eDiLqi09rmbKoUetyGHq2uOIRoRS//kfoJckS0eUzzkDR+k2Q== dependencies: - argparse "^1.0.7" - entities "~2.0.0" - linkify-it "^2.0.0" + argparse "^2.0.1" + entities "~3.0.1" + linkify-it "^4.0.1" mdurl "^1.0.1" uc.micro "^1.0.5"