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 2ee3543

Browse filesBrowse files
Trottaddaleax
authored andcommitted
tools: remove unneeded escaping in generate.js
`-` does not need to be escaped in a regular expression outside of character classes. PR-URL: #9781 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
1 parent b763a31 commit 2ee3543
Copy full SHA for 2ee3543

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+7
-7
lines changed
Open diff view settings
Collapse file

‎tools/doc/generate.js‎

Copy file name to clipboardExpand all lines: tools/doc/generate.js
+7-7Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ let inputFile = null;
1313
let nodeVersion = null;
1414

1515
args.forEach(function(arg) {
16-
if (!arg.match(/^\-\-/)) {
16+
if (!arg.match(/^--/)) {
1717
inputFile = arg;
18-
} else if (arg.match(/^\-\-format=/)) {
19-
format = arg.replace(/^\-\-format=/, '');
20-
} else if (arg.match(/^\-\-template=/)) {
21-
template = arg.replace(/^\-\-template=/, '');
22-
} else if (arg.match(/^\-\-node\-version=/)) {
23-
nodeVersion = arg.replace(/^\-\-node\-version=/, '');
18+
} else if (arg.match(/^--format=/)) {
19+
format = arg.replace(/^--format=/, '');
20+
} else if (arg.match(/^--template=/)) {
21+
template = arg.replace(/^--template=/, '');
22+
} else if (arg.match(/^--node-version=/)) {
23+
nodeVersion = arg.replace(/^--node-version=/, '');
2424
}
2525
});
2626

0 commit comments

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