From c90e7f369b2072afb8361d80a10e2ddeb5e780da Mon Sep 17 00:00:00 2001 From: David Majda Date: Sat, 1 Oct 2011 16:59:05 +0200 Subject: [PATCH] Fix regexp for detecting command-line options in /bin/pegjs Closes GH-51. --- bin/pegjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/pegjs b/bin/pegjs index c24246e..46694e5 100755 --- a/bin/pegjs +++ b/bin/pegjs @@ -45,7 +45,7 @@ function abort(message) { var args = process.argv.slice(2); // Trim "node" and the script path. function isOption(arg) { - return /-.+/.test(arg); + return /^-/.test(arg); } function nextArg() {