Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools: update lint-md-dependencies to [email protected] #47045

Merged
merged 1 commit into from
Mar 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions tools/lint-md/lint-md.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11966,20 +11966,20 @@ function parseParameters(value) {
const parameters = {};
return value
.replace(
/\s+([-\w]+)(?:=(?:"((?:\\[\s\S]|[^"])+)"|'((?:\\[\s\S]|[^'])+)'|((?:\\[\s\S]|[^"'\s])+)))?/gi,
/\s+([-\w]+)(?:=(?:"((?:\\[\s\S]|[^"])*)"|'((?:\\[\s\S]|[^'])*)'|((?:\\[\s\S]|[^"'\s])+)))?/gi,
replacer
)
.replace(/\s+/g, '')
? null
: parameters
function replacer(_, $1, $2, $3, $4) {
let value = $2 || $3 || $4 || '';
let value = $2 === undefined ? ($3 === undefined ? $4 : $3) : $2;
const number = Number(value);
if (value === 'true' || value === '') {
if (value === 'true' || value === undefined) {
value = true;
} else if (value === 'false') {
value = false;
} else if (!Number.isNaN(number)) {
} else if (value.trim() && !Number.isNaN(number)) {
value = number;
}
parameters[$1] = value;
Expand Down
14 changes: 7 additions & 7 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": "^24.0.1",
"@rollup/plugin-node-resolve": "^15.0.1",
"rollup": "^3.18.0",
"rollup": "^3.19.1",
"rollup-plugin-cleanup": "^3.2.1"
}
}