Skip to content
Closed
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
tools: remove gratuitous escaping in generate.js
`-` does not need to be escaped in a regular expression outside of
character classes.
  • Loading branch information
Trott committed Nov 24, 2016
commit 23ddb8e11ccb4be8023b1cf20b70476b8f9169c9
14 changes: 7 additions & 7 deletions tools/doc/generate.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ let inputFile = null;
let nodeVersion = null;

args.forEach(function(arg) {
if (!arg.match(/^\-\-/)) {
if (!arg.match(/^--/)) {
inputFile = arg;
} else if (arg.match(/^\-\-format=/)) {
format = arg.replace(/^\-\-format=/, '');
} else if (arg.match(/^\-\-template=/)) {
template = arg.replace(/^\-\-template=/, '');
} else if (arg.match(/^\-\-node\-version=/)) {
nodeVersion = arg.replace(/^\-\-node\-version=/, '');
} else if (arg.match(/^--format=/)) {
format = arg.replace(/^--format=/, '');
} else if (arg.match(/^--template=/)) {
template = arg.replace(/^--template=/, '');
} else if (arg.match(/^--node-version=/)) {
nodeVersion = arg.replace(/^--node-version=/, '');
}
});

Expand Down