From 9c9142ad8bf0b4b9f697424770039da25ed874ff Mon Sep 17 00:00:00 2001 From: Marijn Haverbeke Date: Mon, 5 Oct 2020 07:55:32 +0200 Subject: [PATCH] Fix potentially-exponential regular expression in use-strict-scanning --- acorn/src/parseutil.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acorn/src/parseutil.js b/acorn/src/parseutil.js index 98e35237f..6b6cb5a37 100644 --- a/acorn/src/parseutil.js +++ b/acorn/src/parseutil.js @@ -6,7 +6,7 @@ const pp = Parser.prototype // ## Parser utilities -const literal = /^(?:'((?:\\.|[^'])*?)'|"((?:\\.|[^"])*?)")/ +const literal = /^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/ pp.strictDirective = function(start) { for (;;) { // Try to find string literal.