tools: update lint-md-dependencies to rollup@2.60.1
PR-URL: https://github.com/nodejs/node/pull/40929 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Michaël Zasso <targos@protonmail.com>
This commit is contained in:
parent
bb3ff8139b
commit
d9de812cb8
@ -5236,8 +5236,7 @@ const own$6 = {}.hasOwnProperty;
|
|||||||
* @returns {string|false}
|
* @returns {string|false}
|
||||||
* Decoded reference.
|
* Decoded reference.
|
||||||
*/
|
*/
|
||||||
function decodeEntity(value) {
|
function decodeNamedCharacterReference(value) {
|
||||||
// @ts-expect-error: to do: use `Record` for `character-entities`.
|
|
||||||
return own$6.call(characterEntities, value) ? characterEntities[value] : false
|
return own$6.call(characterEntities, value) ? characterEntities[value] : false
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5319,7 +5318,7 @@ function tokenizeCharacterReference(effects, ok, nok) {
|
|||||||
|
|
||||||
if (
|
if (
|
||||||
test === asciiAlphanumeric &&
|
test === asciiAlphanumeric &&
|
||||||
!decodeEntity(self.sliceSerialize(token))
|
!decodeNamedCharacterReference(self.sliceSerialize(token))
|
||||||
) {
|
) {
|
||||||
return nok(code)
|
return nok(code)
|
||||||
}
|
}
|
||||||
@ -10185,7 +10184,7 @@ function decode($0, $1, $2) {
|
|||||||
return decodeNumericCharacterReference($2.slice(hex ? 2 : 1), hex ? 16 : 10)
|
return decodeNumericCharacterReference($2.slice(hex ? 2 : 1), hex ? 16 : 10)
|
||||||
}
|
}
|
||||||
|
|
||||||
return decodeEntity($2) || $0
|
return decodeNamedCharacterReference($2) || $0
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -10680,7 +10679,7 @@ function compiler(options = {}) {
|
|||||||
* @this {CompileContext}
|
* @this {CompileContext}
|
||||||
* @param {N} node
|
* @param {N} node
|
||||||
* @param {Token} token
|
* @param {Token} token
|
||||||
* @param {OnError} [errorHandler]
|
* @param {OnEnterError} [errorHandler]
|
||||||
* @returns {N}
|
* @returns {N}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -10714,9 +10713,15 @@ function compiler(options = {}) {
|
|||||||
exit.call(this, token);
|
exit.call(this, token);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/** @type {CompileContext['exit']} */
|
/**
|
||||||
|
* @type {CompileContext['exit']}
|
||||||
|
* @this {CompileContext}
|
||||||
|
* @param {Token} token
|
||||||
|
* @param {OnExitError} [onExitError]
|
||||||
|
* @returns {Node}
|
||||||
|
*/
|
||||||
|
|
||||||
function exit(token) {
|
function exit(token, onExitError) {
|
||||||
const node = this.stack.pop();
|
const node = this.stack.pop();
|
||||||
const open = this.tokenStack.pop();
|
const open = this.tokenStack.pop();
|
||||||
|
|
||||||
@ -10732,8 +10737,12 @@ function compiler(options = {}) {
|
|||||||
'): it’s not open'
|
'): it’s not open'
|
||||||
)
|
)
|
||||||
} else if (open[0].type !== token.type) {
|
} else if (open[0].type !== token.type) {
|
||||||
const handler = open[1] || defaultOnError;
|
if (onExitError) {
|
||||||
handler.call(this, token, open[0]);
|
onExitError.call(this, token, open[0]);
|
||||||
|
} else {
|
||||||
|
const handler = open[1] || defaultOnError;
|
||||||
|
handler.call(this, token, open[0]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
node.position.end = point(token.end);
|
node.position.end = point(token.end);
|
||||||
@ -11093,9 +11102,10 @@ function compiler(options = {}) {
|
|||||||
);
|
);
|
||||||
setData('characterReferenceType');
|
setData('characterReferenceType');
|
||||||
} else {
|
} else {
|
||||||
// @ts-expect-error `decodeEntity` can return false for invalid named
|
// @ts-expect-error `decodeNamedCharacterReference` can return false for
|
||||||
// character references, but everything we’ve tokenized is valid.
|
// invalid named character references, but everything we’ve tokenized is
|
||||||
value = decodeEntity(data);
|
// valid.
|
||||||
|
value = decodeNamedCharacterReference(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
const tail = this.stack.pop();
|
const tail = this.stack.pop();
|
||||||
@ -11325,7 +11335,7 @@ function extension(combined, extension) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/** @type {OnError} */
|
/** @type {OnEnterError} */
|
||||||
|
|
||||||
function defaultOnError(left, right) {
|
function defaultOnError(left, right) {
|
||||||
if (left) {
|
if (left) {
|
||||||
|
2725
tools/lint-md/package-lock.json
generated
2725
tools/lint-md/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -16,6 +16,6 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@rollup/plugin-commonjs": "^21.0.1",
|
"@rollup/plugin-commonjs": "^21.0.1",
|
||||||
"@rollup/plugin-node-resolve": "^13.0.6",
|
"@rollup/plugin-node-resolve": "^13.0.6",
|
||||||
"rollup": "^2.60.0"
|
"rollup": "^2.60.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user