From f51895bfee3047d808d7afdaad498526f040e787 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 bce71b54e..7ef24a6da 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.