Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 22265e3

Browse filesBrowse files
nodejs-github-bottargos
authored andcommitted
tools: update lint-md-dependencies to rollup@2.60.1
PR-URL: #40929 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Michaël Zasso <targos@protonmail.com>
1 parent ae12a60 commit 22265e3
Copy full SHA for 22265e3

File tree

Expand file treeCollapse file tree

3 files changed

+62
-2701
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

3 files changed

+62
-2701
lines changed
Open diff view settings
Collapse file

‎tools/lint-md/lint-md.mjs‎

Copy file name to clipboardExpand all lines: tools/lint-md/lint-md.mjs
+23-13Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5236,8 +5236,7 @@ const own$6 = {}.hasOwnProperty;
52365236
* @returns {string|false}
52375237
* Decoded reference.
52385238
*/
5239-
function decodeEntity(value) {
5240-
// @ts-expect-error: to do: use `Record` for `character-entities`.
5239+
function decodeNamedCharacterReference(value) {
52415240
return own$6.call(characterEntities, value) ? characterEntities[value] : false
52425241
}
52435242

@@ -5319,7 +5318,7 @@ function tokenizeCharacterReference(effects, ok, nok) {
53195318

53205319
if (
53215320
test === asciiAlphanumeric &&
5322-
!decodeEntity(self.sliceSerialize(token))
5321+
!decodeNamedCharacterReference(self.sliceSerialize(token))
53235322
) {
53245323
return nok(code)
53255324
}
@@ -10185,7 +10184,7 @@ function decode($0, $1, $2) {
1018510184
return decodeNumericCharacterReference($2.slice(hex ? 2 : 1), hex ? 16 : 10)
1018610185
}
1018710186

10188-
return decodeEntity($2) || $0
10187+
return decodeNamedCharacterReference($2) || $0
1018910188
}
1019010189

1019110190
/**
@@ -10680,7 +10679,7 @@ function compiler(options = {}) {
1068010679
* @this {CompileContext}
1068110680
* @param {N} node
1068210681
* @param {Token} token
10683-
* @param {OnError} [errorHandler]
10682+
* @param {OnEnterError} [errorHandler]
1068410683
* @returns {N}
1068510684
*/
1068610685

@@ -10714,9 +10713,15 @@ function compiler(options = {}) {
1071410713
exit.call(this, token);
1071510714
}
1071610715
}
10717-
/** @type {CompileContext['exit']} */
10716+
/**
10717+
* @type {CompileContext['exit']}
10718+
* @this {CompileContext}
10719+
* @param {Token} token
10720+
* @param {OnExitError} [onExitError]
10721+
* @returns {Node}
10722+
*/
1071810723

10719-
function exit(token) {
10724+
function exit(token, onExitError) {
1072010725
const node = this.stack.pop();
1072110726
const open = this.tokenStack.pop();
1072210727

@@ -10732,8 +10737,12 @@ function compiler(options = {}) {
1073210737
'): it’s not open'
1073310738
)
1073410739
} else if (open[0].type !== token.type) {
10735-
const handler = open[1] || defaultOnError;
10736-
handler.call(this, token, open[0]);
10740+
if (onExitError) {
10741+
onExitError.call(this, token, open[0]);
10742+
} else {
10743+
const handler = open[1] || defaultOnError;
10744+
handler.call(this, token, open[0]);
10745+
}
1073710746
}
1073810747

1073910748
node.position.end = point(token.end);
@@ -11093,9 +11102,10 @@ function compiler(options = {}) {
1109311102
);
1109411103
setData('characterReferenceType');
1109511104
} else {
11096-
// @ts-expect-error `decodeEntity` can return false for invalid named
11097-
// character references, but everything we’ve tokenized is valid.
11098-
value = decodeEntity(data);
11105+
// @ts-expect-error `decodeNamedCharacterReference` can return false for
11106+
// invalid named character references, but everything we’ve tokenized is
11107+
// valid.
11108+
value = decodeNamedCharacterReference(data);
1109911109
}
1110011110

1110111111
const tail = this.stack.pop();
@@ -11325,7 +11335,7 @@ function extension(combined, extension) {
1132511335
}
1132611336
}
1132711337
}
11328-
/** @type {OnError} */
11338+
/** @type {OnEnterError} */
1132911339

1133011340
function defaultOnError(left, right) {
1133111341
if (left) {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.