diff --git a/tools/doc/generate.js b/tools/doc/generate.js index 077e740432c837..31b23c52a08ba7 100644 --- a/tools/doc/generate.js +++ b/tools/doc/generate.js @@ -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=/, ''); } });