Skip to content

Commit

Permalink
tools: update lint-md-dependencies to [email protected]
Browse files Browse the repository at this point in the history
PR-URL: #43871
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
  • Loading branch information
nodejs-github-bot authored and danielleadams committed Jul 26, 2022
1 parent e12bf40 commit c92135a
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 32 deletions.
12 changes: 6 additions & 6 deletions tools/lint-md/lint-md.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10748,6 +10748,7 @@ const findAndReplace =
const replace = pairs[pairIndex][1];
let start = 0;
const index = parent.children.indexOf(node);
let change = false;
let nodes = [];
let position;
find.lastIndex = 0;
Expand All @@ -10763,9 +10764,7 @@ const findAndReplace =
if (typeof value === 'string') {
value = value.length > 0 ? {type: 'text', value} : undefined;
}
if (value === false) {
position = undefined;
} else {
if (value !== false) {
if (start !== position) {
nodes.push({
type: 'text',
Expand All @@ -10778,19 +10777,20 @@ const findAndReplace =
nodes.push(value);
}
start = position + match[0].length;
change = true;
}
if (!find.global) {
break
}
match = find.exec(node.value);
}
if (position === undefined) {
nodes = [node];
} else {
if (change) {
if (start < node.value.length) {
nodes.push({type: 'text', value: node.value.slice(start)});
}
parent.children.splice(index, 1, ...nodes);
} else {
nodes = [node];
}
return index + nodes.length
}
Expand Down
50 changes: 25 additions & 25 deletions tools/lint-md/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tools/lint-md/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"devDependencies": {
"@rollup/plugin-commonjs": "^22.0.1",
"@rollup/plugin-node-resolve": "^13.3.0",
"rollup": "^2.76.0",
"rollup": "^2.77.0",
"rollup-plugin-cleanup": "^3.2.1"
}
}

0 comments on commit c92135a

Please sign in to comment.